androidandroid-studiocordovaionic-frameworkimei

How to get IMEI number in android 10? Any alternative for uniquely identifying device?


I need to access IMEI number of android phones using ionic to uniquely identify devices. It is working for android version 9 and lower but not working for android 10. Is there any way to access IMEI number for Android 10 or is there any alternative to uniquely identify the android devices.


Solution

  • Have you checked this: Best practices for unique identifiers

    You can use:

    String uniqueID = UUID.randomUUID().toString();
    

    You can save it in preference to maintain uniqueness.