Skip to content

Conversation

Ombuweb
Copy link
Contributor

@Ombuweb Ombuweb commented Nov 27, 2022

No description provided.

@cla-bot cla-bot bot added the cla: yes label Nov 27, 2022
@Ombuweb Ombuweb marked this pull request as draft November 27, 2022 22:29
Comment on lines 8 to 70
## Using Platform

The API of the Platform module is accessible through the following imports:

```ts
import { Device, Screen } from '@nativescript/core'
```

### Getting a device type

To check if a device is a phone or tablet, use the [deviceType](#devicetype) property.

```ts
const deviceType: string = Device.deviceType
```

### Getting a device manufacturer

A device's manufacturer get be accessed using the [manufacturer](#manufacturer) property.

```ts
const manufacturer: string = Device.manufacturer
```

### Getting the model of a device
```ts
const model: string = Device.model
```

### Checking a device operating system name
To get the device operating system name, use the [os](#os) property:

```ts
const os: string = Device.os
```

### Getting a device operating system version

To access the operating system version of the device, use the [osVersion](#osversion) property:

```ts
const osVersion: string = Device.osVersion
```

### Getting the device region
```ts
const region: string = Device.region
```

### Getting the device's sdk version

Use the [sdkVersion](#sdkversion) property to get the
SDK version:
```ts
const sdkVersion: string = Device.sdkVersion
```

### Getting the device uuid
To access the device's universally unique id(uuid), use the [uuid](#uuid) property:

```ts
const uuid: string = Device.uuid
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is just reiteration of what all we have said in the docs:Device #52

Can you please tell why is this repeated here as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely not needed, we will look at removing this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure @NathanWalker
Please let me know if anything is needed

@NathanWalker NathanWalker marked this pull request as ready for review July 17, 2023 19:07
@NathanWalker NathanWalker changed the base branch from main to dev July 17, 2023 19:07
@NathanWalker NathanWalker merged commit 9ce3e7c into NativeScript:dev Jul 17, 2023
NathanWalker added a commit to Ombuweb/docs that referenced this pull request Aug 13, 2023
Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com>
NathanWalker added a commit to Ombuweb/docs that referenced this pull request Aug 30, 2023
Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants