How to get IMEI in android 10

For security purposes, I want to store the IMEI number of app users but I am getting the following error

2020-02-14 13:29:36.620 14794-14794/com.udaan.android.creditoperations E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.udaan.android.creditoperations, PID: 14794
    java.lang.SecurityException: getImeiForSlot: The user 10643 does not meet the requirements to access device identifiers.
        at android.os.Parcel.createException(Parcel.java:2071)
        at android.os.Parcel.readException(Parcel.java:2039)
        at android.os.Parcel.readException(Parcel.java:1987)
        at com.android.internal.telephony.ITelephony$Stub$Proxy.getImeiForSlot(ITelephony.java:10471)
        at android.telephony.TelephonyManager.getImei(TelephonyManager.java:1754)
        at android.telephony.TelephonyManager.getImei(TelephonyManager.java:1715)

Is there any way to access IMEI number including latest android devices?

Starting from Android 10, Third-party apps installed from the Google Play Store cannot get IMEI number. That's why you are getting this Security Exception.

I would suggest you use any other unique id for your purpose. For best practices of unique identifiers recommended by Google, you can check out the below link

https://developer.android.com/training/articles/user-data-ids

I am getting IMEI null in Android Q?, Just go into the settings and look at the IMEI ? You cannot use a third party application on the Phone to request the IMEI (for privacy) but you can still view it in the built in settings app. Hi guys, as you know Google restricted access to IMEI on Android 10 (only device owner apps can get IMEI now), who knows how we can get IMEI with Airwatch, it looks like that Airwatch Launcher is a top level app (probably device owner app), it can controll your device and block user on partical app, so it also should have access to IMEI, but no, is there any way to get IMEI on Android 10 now?

Have you tried to add permission to AndroidManifest file?

<uses-permission android:name="android.permission.READ_PHONE_STATE" />

Android 10 device identification, Method 2: Check IMEI in Settings. For the second method, you can navigate to Settings > About phone (or My phone > All specs > Status). Once� Source: Android Central. Once you have entered this code, the MEID and any other IMEI numbers will appear on your device. This method is the easiest because it works regardless of what Android

From Android 10, there is no way to get it. Find an alternative unique identifier from document which shared by Abhishek.

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.

More details;

https://developer.android.com/about/versions/10/privacy/changes

How to get IMEI on Android 10, IMEI numbers of devices running Android 10 unless the app is a system app. I even wrote about this to Google, and didn't get any response about the� 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.

Substitute for IMEI in Android 10 : androiddev, Hi guys, as you know Google restricted access to IMEI on Android 10 (only device owner apps can get IMEI now), who knows how we can get� How to get IMEI number for android 10?? Is there having any alternative way for finding unique id for dual sim slots. I need a unique identifier for dual sim slots id for android10. For android9 and below imei number is capturing based on sim slots. What is the way to capture unique device id?

Get IMEI on Android 10 |VMware Communities, how to get imei number in android 10 programmatically android get imei without permission android 10 storage permission denied android 10 security features Like Once you change IMEI number on Android, it can’t be traced. Thus, if your phone gets stolen after changing the IMEI number, the cyber police won’t be able to trace it with ease. How to Know the IMEI Number of Android Phones? Well, getting the info regarding the IMEI numbers of any phone is pretty easy. There are two basic ways to get

No IMEI for Android Developers in Android 10, How to find the IMEI number on your Android phone. Harish Jonnalagadda. 4 Feb 2020. IMEI on Galaxy Note 10+ 5G Source: Andrew Myrick / Android Central. IMEI number also known as International mobile equipment identity is the unique number of every mobile phone in the whole world. The imei number is used to manage and identify the mobile phone. On android app we can easily get the current mobile device imei number using TelephonyManager class.

Comments
  • After Q - no. Why do you want the IMEI perhaps we can offer an alternative?