Hina-Hussain / DeviceInformationPlugin

Apache License 2.0
6 stars 11 forks source link

Getting wrong IMEI number #7

Open rahul-mobilecoderz opened 1 year ago

rahul-mobilecoderz commented 1 year ago

Unable to get the expected IMEI number .

braysonjohn148 commented 1 year ago

Did you get the solution.

rahulkushwaha482 commented 1 year ago

Did you get the solution.

No , I can't find any solutions

tazzix commented 1 year ago

Android / iOS don't support access to IMEI number anymore, hence the code in the repo: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { imeiNumber = getDeviceUniqueID();

Rajkumarlohar65 commented 1 year ago

it gives a unique number of device is it always same for the particular device.

tazzix commented 1 year ago

Not necessarily, there is some code trying to use the wide vine DRM to generate a UUID, but even then there is a chance that an app re-install or a device reset will cause in a different ID so using the FIS (firebase installation service) sounds like a bit of a better approach but as times are changing, there is no guaranteed way of tracking a device. This is particularly challenging for apps requiring more security, e.g. fintech. But the privacy risks out weigh the benefits:

https://github.com/Hina-Hussain/DeviceInformationPlugin/blob/68a5127bcb118962810df0de7d0cead299e7fa8c/android/src/main/java/co/creativemind/device_information/DeviceInformationPlugin.java#L114

jlestrat commented 1 year ago

Get IMEI to Android 9 (API 28) with the telephonyManager work. This condition is wrong : if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P). I fork to fix this by if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P).

ahmed-moha commented 1 year ago

Get IMEI to Android 9 (API 28) with the telephonyManager work. This condition is wrong : if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P). I fork to fix this by if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P).

so what is the deference between the codes ? above