Can I prevent the application from being installed on a special device in Android?

I have a corporate application that should not be installed on all mobile phones. I have 50 mobile phones with their IMEI information, my application should be installed only on these 50 mobile phones. The user should not install my application, even if he receives apk.

I tried this: If I install the application, then I can check if the IMEI mobile number is one of 50. If it is not among the 50, I can prevent it from logging in. But I want to prevent the installation in the first place, to reduce the risk.

+4
source share
4 answers

AFAIK, It is impossible to prevent the installation of the application if you have an APK file. Although you can prevent the application from working on a specific device, I think you did it.

Otherwise, you can look here if you want to install the application over the network. Using this, you can only install the application on the devices that you want to allow.

+2
source

As @Sahil says you cannot ban the installation of your application if you have an apk file.

but, AFAIK, you say that you have an IMEI number of 50 mobile phones. Therefore, I think it can be 70% possible with Stratergy.

I think I can help you solve your problem to a certain level (not completely).

As I said, it will not solve your problem completely, but you can limit your application, which will not be installed in the "Other devices" section, which are not included in the list of names of mobile brands 50.

You can prevent the application from being installed in all other Brands / Models that are not included in the list of 50 mobile phones.

What you can do is filter out the application for a specific device using the names of your devices.

Using below, you do not have to filter your application based on programming.

nut you can do it from the developer console of the Android developer - Here , when you publish your application.

The developer console has a section "Supported devices", which shows a list of all devices that can access the android market. You can then filter out devices or manufacturers that are not compatible with your application.

This is the section in the main developer console:

This is the section in the main developer console

Here you can prevent devices and / or manufacturers from seeing your application

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

For more information, see the Device Availability man page that says:

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

Understand which devices can find your application in the Android Market

  • Device Availability provides a dynamic list of compatible devices based on your manifest settings. For example, if your apks manifest indicates a large screen size, the console will display supported devices that your application can find in the Market.

  • You can also use dynamic search to see devices that will not be available to your application. j. You can search the manufacturer for the name of the project (for example, “Passion”), or the actual name of the public device (for example, “Nexus One”) to find out if manifest parameters filtered the device. Filter problem or incompatible devices This feature provides a device-specific administrative option for developers. When you add a device to the "Manually Excluded Devices" list, your application will not be available for that device in the Market. This is primarily intended to help developers provide the best user experience by helping developers filter devices that are known to have compatibility issues.

As I said, it will not solve your problem completely, but you can limit your application, which will not be installed in the "Other devices" section, which are not on your list of mobile brand names 50.

Hope this helps you.

+1
source

Your solution seems the most convenient at the moment. You can also have enterprise-level restrictions on your devices using device management policies. Cm:

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

0
source

Although it is old, but if someone is faced with such a need, there are 3 things:

  • It is not possible to prevent the installation of the application if someone has an APK file.
  • You can filter your application for a specific device using the names of your devices in the Android Developer Console.
  • The best solution is to use the IMEI information filter.

This is done in the following steps:

  • after starting the application (while the screen saver is displayed), get information about the IMEI device,
  • check if the Internet is accessible if it does not ask the user and pauses operation until the Internet is available.
  • When internet access is available, check the device’s IMEI Info for the IMEI information in your database.
  • if they match or if they are found, return the value to the device,
  • based on the return value, you can continue to work with the launch of the application or kill the application process.

Note:

The best way to make the third point is to use a code block with a common preference, i.e. the code block should only be executed during the first launch of the application, otherwise your application may turn users off if you have to check it all the time.

0
source

All Articles