I have an enterprise app which should not be installed in all mobiles. I have 50 mobiles with their IMEI info, my application should be installed only in these 50 mobiles. A user should not be able to install my app even if he gets the apk.
I have tried this : If i install the app then i can check whether the mobile's IMEI number is one among the 50. If it is not among the 50, i can prevent him from logging in. But i want to prevent the installation in the first place to reduce the risk.
AFAIK, Its not possible to prevent App installation, if one has the APK file. Though you could prevent the app to run on particular device as I think you have done.
Else, you can have a look here, if you want to install the app over the network. Using this, you can install the app only on the devices you want to allow.