UNPKG

1.41 kBTypeScriptView Raw
1/*
2 * An object containing device specific information.
3 */
4export interface IDevice {
5 /**
6 * Gets the manufacturer of the device.
7 * For example: "Apple" or "HTC" or "Samsung".
8 */
9 manufacturer: string;
10
11 /**
12 * Gets the model of the device.
13 * For example: "Nexus 5" or "iPhone".
14 */
15 model: string;
16
17 /**
18 * Gets the OS of the device.
19 * For example: "Android" or "iOS".
20 */
21 os: string;
22
23 /**
24 * Gets the OS version.
25 * For example: 4.4.4(android), 8.1(ios)
26 */
27 osVersion: string;
28
29 /**
30 * Gets the SDK version.
31 * For example: 19(android), 8.1(ios).
32 */
33 sdkVersion: string;
34
35 /**
36 * Gets the type of the current device.
37 * Available values: "Phone", "Tablet".
38 */
39 deviceType: 'Phone' | 'Tablet';
40
41 /**
42 * Gets the uuid.
43 * On iOS this will return a new uuid if the application is re-installed on the device.
44 * If you need to receive the same uuid even after the application has been re-installed on the device,
45 * use this plugin: https://www.npmjs.com/package/nativescript-ios-uuid
46 */
47 uuid: string;
48
49 /**
50 * Gets the preferred language. For example "en" or "en-US".
51 */
52 language: string;
53
54 /**
55 * Gets the preferred region. For example "US".
56 */
57 region: string;
58}
59
60/**
61 * Gets the current device information.
62 */
63export const Device: IDevice;
64
65/**
66 * Gets the current device information.
67 *
68 * This retains compatibility with NS6
69 */
70export const device: IDevice;