roblav96 / nativescript-telephony

A Nativescript plugin to get the device's SIM data (carrier name, mcc mnc, country code, telephonenumber, etc)
Other
22 stars 9 forks source link

DeviceID not found on Android10 #15

Closed fabclovinn closed 4 years ago

fabclovinn commented 4 years ago

After using this plugin for more than a year, I'm now having issues to get the deviceID in an Android10 device.

This is the data sample I'm getting: callState: "" carrierName: "T-Mobile" countryCode: "us" dataActivity: "" deviceId: "" deviceSoftwareVersion: "----" isNetworkRoaming: "" mcc: "310" mnc: "260" networkType: 13 phoneNumber: "+xxxxx" phoneType: 1 simOperator: "310260" simSerialNumber: "" simState: 5 subscriberId: "" __proto__: Object

This is how I'm asking the data Telephony().then((resolved) => { if (resolved.deviceId) { this.logged.code = resolved.deviceId; resolve(); } else { reject(); } }).catch((error) => { reject(error); });

Version of plugin: '"nativescript-telephony": "^1.0.4",'

fedee13 commented 4 years ago

It's not possible anymore to get deviceID on Android 10 https://developer.android.com/about/versions/10/privacy/changes#non-resettable-device-ids

fabclovinn commented 4 years ago

Ouch.... ok, thanks for the information.