1

I want to restrict my application to install only allowed device. That is while installing the app I want to fetch the device information like imei number. Then I want to check the imei number if it is valid or not using my restored database of imei.

Is that possible?

Avinash Roy
  • 988
  • 1
  • 8
  • 25
Robin Halder
  • 243
  • 2
  • 14
  • 1
    Very well explained, how to and disadvantages: [Already answered question](https://stackoverflow.com/questions/1972381/how-to-get-the-devices-imei-esn-programmatically-in-android) – Foo Bar May 25 '17 at 09:28

1 Answers1

1

Its not possible to prevent App installation, if one has the APK file but Through smart coding you can achieve it

1) Anyways you will get the IMEI numbers of the users phone so programatically you can check the condition on landing/splash page if IMEI==USER_IMEI_NUMBER then only he/she can able to see its main page else he will not get authority to enter into main page but for that you need to create APK file for each device

2) If you dont know how many users will use your app then you can do remote database in that database you can save new users IMEI number and in splash/landing page you can check through webservice that IMEI==USERS_IMEI_NUMBER (from remote database) then he/she can use your app but off course for that you need to mention internet permission in it and user must have valid internet connection if you dont want user to check it identity/IMEI number each time then you can validate user at once and you can save its result in shared preferrences and you can give access to user everytime without hiting webservice for validation

hope this suggestion may help you happy coding :)

Avinash Roy
  • 988
  • 1
  • 8
  • 25