add device info collector
This commit is contained in:
1 parent
4140922530
commit
1c3886e10c
4 files changed
+177
No files matched your search
@@ -51,6 +51,34 @@ JS 全局对象:
|
||||
|
||||
所有方法都使用 Cordova callback 风格,适合在 OutSystems client action 中封装。
|
||||
|
||||
```js
|
||||
BluememeUtils.getDeviceInfo(function (info) {
|
||||
console.log(info.deviceKey);
|
||||
}, error);
|
||||
```
|
||||
|
||||
`getDeviceInfo` 返回:
|
||||
|
||||
```json
|
||||
{
|
||||
"deviceKey": "generated-and-persisted-uuid",
|
||||
"platform": "Android",
|
||||
"appIdentifier": "com.company.app",
|
||||
"appVersion": "1.0.0",
|
||||
"buildNumber": "1",
|
||||
"osVersion": "15",
|
||||
"sdkVersion": 35,
|
||||
"deviceModel": "Google Pixel 8",
|
||||
"manufacturer": "Google",
|
||||
"brand": "google",
|
||||
"model": "Pixel 8",
|
||||
"locale": "ja-JP",
|
||||
"timeZone": "Asia/Tokyo"
|
||||
}
|
||||
```
|
||||
|
||||
`deviceKey` 首次调用时生成并保存在本地,用于标识当前 App 安装实例。App 卸载或清除数据后会重新生成。iOS 不返回 `sdkVersion`、`manufacturer`、`brand`,但会返回 `systemName`。
|
||||
|
||||
```js
|
||||
BluememeUtils.requestWifiPermission(success, error);
|
||||
|
||||
|
||||
Reference in new issue
Block a user