0

I am clear that in ANDROID there are restrictions to obtain the IMEI, but I need to guarantee that the project I have is installed only on allowed cell phones. For this I think that a unique code is necessary that is generated from the cell phone (equal to the IMEI) and that is stored in parallel in the server's database to validate that it is correct.

Is there any way to simulate this condition from CN1?

  • Does this answer your question? [How to get the device's IMEI/ESN programmatically in android?](https://stackoverflow.com/questions/1972381/how-to-get-the-devices-imei-esn-programmatically-in-android) – Martin Zeitler Jul 26 '21 at 23:30

3 Answers3

0

Google play will block the installation of your app. If you still want to do it you can use:

String IMEI = Display.getInstance().getProperty("IMEI");

Notice that you would need to add the "read phone state" permission to the manifest for this to work.

I don't think this is a good idea though. How will you find the IMEI in the first place to perform the restriction?

Blocking installation isn't a practical option, you should block access so unauthorized users won't be able to launch the app and that's more portable too.

Shai Almog
  • 51,749
  • 5
  • 35
  • 65
0

Thank you Mr. Shai, my project blocks access to unauthorized users, but there is the alternative of installing the application on another cell phone and that is what I want to avoid.

0

Something important, the following link talks about an alternative to have a unique code, but it is totally oriented to android and I do not handle it and I do not know how to implement it in CN1. I copy the link to see if its integration is possible. Android 10: IMEI no longer available on API 29. Looking for alternatives