-
-
Notifications
You must be signed in to change notification settings - Fork 32
docs: Platform #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Platform #49
Conversation
content/guide/core/platform.md
Outdated
## 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 | ||
``` |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com>
Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com>
No description provided.