Since we are not able to get DeviceId, get Imei, get Meid, get SimSerialNumber, get SubscriberId and get Serial from Android 10 and higher devices,
the most practical way is to generate a random string and save it on sdcard, and retrieve the string back from the file when needed.
This is what this extension is doing.
This can be done by build-in components, but I think this extension will save time for you.
blocks
known issue
if the file is deleted from sdcard and the app was re-installed (same time), the uuid will change.
not working in Screen.Initialized event, use a clock in stead
It’s a good idea.
I have a little doubt. It stores the file in sd card. What if user don’t have sd card in his/her device? Will it store it in device internal storage?
A lot of famous app using this method. Connect your phone with computer by Usb, on sdcard you will find some small - sized hidden file which name start with a dot, and inside which there is a ramdom string.
Tested by compiling on AI2 test server. No uuid file created, cannot ask for Write permission / not granted. Extension needs to save to ASD for Android 11 / target API 30.