Can i prevent an application from being installed in a particluar device in android?

4.5k views Asked by At

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.

4

There are 4 answers

0
Sahil Mahajan Mj On BEST ANSWER

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.

0
The Billionaire Guy On

Though this is old but if someone runs into such a need, there are 3 things to note:

  1. Its not possible to prevent App installation, if someone has the APK file.
  2. You can filter your Application for specific Device with your Device Brand Names in android market developer console.
  3. The best solution is to use IMEI Information filter.

This is done in the following steps:

  • once your app launches (during splash screen displaying), get the IMEI Info of the device,
  • check if internet is available, if not prompt the user and suspend task until internet is available
  • once internet is available, check the IMEI Info of the device against the IMEI info you have in your database
  • if they match or if found, return a value to the device,
  • based on the value returned you could choose to continue with the app launch or kill the app process.

NOTE:

The best way to go about the 3rd point is to use the block of code on a shared preference, i.e the block of code should be executed only during the first launch of the app, else your app might disgust users if you have to check this all the time.

0
Anup Cowkur On

Your solution seems to be the most convenient at this point. You can also have enterprise level restrictions on your devices using Device Management Policies. See:

http://developer.android.com/training/enterprise/device-management-policy.html

0
Bhavesh Patadiya On

As @Sahil says you can't prevent your application not to be installed if one has apk file.

but,AFAIK you are saying that you have IMEI number of 50 Mobiles. So i think this coulde be 70% possible with the Below Stratergy.

I think i can Help you to Solve your Problem Up to Some Level(Not Completely).

As I have Said you it will not solve your Problem Completely but you can Restrict your Application not to be installed in Rest of the Devices which are not in your 50 Mobile Brand Names List.

you can Prevent your app not being installed in All other Brands/Models which are not in your 50 Mobiles List.

What you can Do is Filter your Application for specific Device with your Device Brand Names.

By Using Below, you will not have to filter your app based on Programming.

nut you can do it from the android market developer console -Here when you are publishing your app.

There is a 'Supported Devices' section on the developer console, which shows you a list of all the devices which can access the android market. You can then filter out devices or manufacturers that are not compatible with your app

This is the section in the main developer console:

This is the section in the main developer console

Here you can exclude devices and/or manufacturers from being able to see your app

Here you can exclude devices and/or manufacturers from being able to see your app

For more information please refer to the Device Availability help page which says:

The Device Availability dialog can help developers in two powerful ways:

Understand which devices can find your app in Android Market

  1. Device Availability provides a dynamic list of compatible devices based upon your manifest settings. For example, if your apk’s manifest specifies a large screen size, the console will reflect the supported devices that can find your app in Market.

  2. You can also use the dynamic search feature to see the devices that your application will not be available to. You can search by manufacturer, the design name (E.g. “Passion”), or the actual public device name (E.g. "Nexus One"), to see if your manifest settings filtered a device. Filter problematic or non-compatible devices This feature provides a device-specific administration option to developers. When you add a device to the “Manually Excluded Devices” list, your app will not be available to that excluded device in Market. This is primarily intended to help developers provide the best user experience possible, by helping developers filter out devices known to have compatibility problems.

As I have Said you it will not solve your Problem Completely but you can Restrict your Application not to be installed in Rest of the Devices which are not in your 50 Mobile Brand Names List.

Hope it will Help you.