Hello,
i’m develop an app Ionic 5 with Capacitor.
My app needs to identify the devices by users, and for that, i use the Device API to get uuid :
import { Plugins } from '@capacitor/core';
const { Device } = Plugins;
const info = await Device.getInfo();
this.deviceId = info.uuid;
With Android 10 we know that our apps can’t access IMEI numbers of devices running Android 10 :
Starting in Android 10, apps must have the READ_PRIVILEGED_PHONE_STATE privileged permission in order to access the device's non-resettable identifiers, which include both IMEI and serial number.
Caution: Third-party apps installed from the Google Play Store cannot declare privileged permissions.
My app is a third-party app, so what is the impact of usage of the uuid number used in my application?
Will the above code still work on android 10?
Yes, I have read the android documentation, but I cannot find a direct reference to the uuid.
Or rather I do not know what exactly corresponds the uuid returned by Capacitor on android.
When I test on an Android 10, it returns a number. But I don’t know what exactly this number corresponds to on Android.
Maybe that sounds as a dumb question but I am not very experienced with this questions, and I find it difficult to make the link between the different terminologies.
Ah, ok. Looking at the Capacitor source, the UUID is the Settings.Secure.ANDROID_ID, which I don’t think is affected by the changes in Android 10.0. It’s not one of those “non-resettable” IDs as far as I understand.