js-apis-device-info.md 2.7 KB
Newer Older
E
esterzhou 已提交
1
# Device Information
Z
zengyawen 已提交
2

E
ester.zhou 已提交
3 4
> **NOTE**
>
E
esterzhou 已提交
5 6 7
> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.

## Modules to Import
Z
zengyawen 已提交
8

P
update  
Peter_1988 已提交
9
```ts
Z
zengyawen 已提交
10 11 12
import deviceInfo from '@ohos.deviceInfo'
```

E
esterzhou 已提交
13
## Attributes
Z
zengyawen 已提交
14

E
ester.zhou 已提交
15
**System capability**: SystemCapability.Startup.SystemInfo
Z
zengyawen 已提交
16

E
esterzhou 已提交
17 18 19 20 21 22 23 24 25 26 27
| Name| Type| Readable| Writable| Description|
| -------- | -------- | -------- | -------- | -------- |
| deviceType | string | Yes| No| Device type.|
| manufacture | string | Yes| No| Device manufacturer.|
| brand | string | Yes| No| Device brand.|
| marketName | string | Yes| No| Marketing name.|
| productSeries | string | Yes| No| Product series.|
| productModel | string | Yes| No| Product model.|
| softwareModel | string | Yes| No| Software model.|
| hardwareModel | string | Yes| No| Hardware model.|
| hardwareProfile | string | Yes| No| Hardware profile.|
E
ester.zhou 已提交
28
| serial | string | Yes| No| Device serial number.<br>**Required permissions**: ohos.permission.sec.ACCESS_UDID (a system permission)|
E
esterzhou 已提交
29 30 31 32 33
| bootloaderVersion | string | Yes| No| Bootloader version.|
| abiList | string | Yes| No| Application binary interface (Abi) list.|
| securityPatchTag | string | Yes| No| Security patch tag.|
| displayVersion | string | Yes| No| Product version.|
| incrementalVersion | string | Yes| No| Incremental version.|
E
ester.zhou 已提交
34
| osReleaseType | string | Yes| No| OS release type. The options are as follows:<br>- **Canary**: Preliminary release open only to specific developers. This release does not promise API stability and may require tolerance of instability.<br>- **Beta**: Release open to all developers. This release does not promise API stability and may require tolerance of instability.<br>- **Release**: Official release open to all developers. This release promises that all APIs are stable.|
E
esterzhou 已提交
35 36 37 38 39 40 41 42 43 44 45 46 47
| osFullName | string | Yes| No| OS version.|
| majorVersion | number | Yes| No| Major version, incrementing along with OS version updates.|
| seniorVersion | number | Yes| No| Senior version, incrementing along with architecture and feature updates.|
| featureVersion | number | Yes| No| Feature version.|
| buildVersion | number | Yes| No| Build version.|
| sdkApiVersion | number | Yes| No| SDK API version.|
| firstApiVersion | number | Yes| No| First API version.|
| versionId | string | Yes| No| Version ID.|
| buildType | string | Yes| No| Build type.|
| buildUser | string | Yes| No| Build user.|
| buildHost | string | Yes| No| Build host.|
| buildTime | string | Yes| No| Build time.|
| buildRootHash | string | Yes| No| Build root hash.|
E
ester.zhou 已提交
48
| udid<sup>7+</sup> | string | Yes| No| Device UDID.<br>**Required permissions**: ohos.permission.sec.ACCESS_UDID (a system permission)|