As the Android platform continues to grow and spread to new types of devices, it becomes more important for developers to keep track of where their applications are deployed. While market filters are available for developer configuration, sometimes the default filters don't go far enough. This tutorial will teach you to exclude specific devices manually!
The Android Market allows developers to specifically exclude devices by name. These devices are organized by manufacturer. You can only create a list of exclusions (a.k.a. a black list), not inclusions (a.k.a. a white list), although inclusions are feasible simply by blacklisting every device except the few you want to "include". The exclusion feature is built more for the developer who runs into a device-specific problem and needs to exclude a device until they have a chance to fix the underlying problem. It is not currently a sophisticated publication rules engine.
Note: The Android Market manual exclusion list only controls how the Android Market lists your applications for users to download. No actual changes are made to the application package itself. Your app can still be installed on "excluded" devices without issue if the user were to find the package through other means, unlike some of the Android manifest file features which the Android platform actually checks for and enforces.
Step 0: Reasons to Exclude Devices
Before you go configuring your application listing on the Android Market from excluding specific devices, give some thought as to why you are doing so. Under normal circumstances, you should be able to solve any incompatibility issues using the market filters built into the platform. For example, you should be setting the Android Manifest file settings to filter your application in terms of appropriate API Levels and other flags. Some reasons you might want to use the manual exclusion feature of the Android Market include:
- Excluding a problematic device, such as one that routinely has caused your application to have bad ratings (until you can fix the problem).
- Excluding a class of devices with specific form factors, features, or configurations not supported with Android manifest file settings (like excluding all tablets).
- Excluding all devices from a specific manufacturer for contractual reasons.
- Forcing your application to be published only on a very specific subset of devices (and no others), likely for business reasons.
The first option is the only real technical reason this would be needed. It's a good option if you need to quickly disable access by certain devices while you come up with a fix or workaround to the issue.
Step 1: Login to Your Market Account
You must have a valid Android Market account and an application ready to publish or already published to manage an exclusion list. Each application can have its own exclusion list that is managed separately; they may not be combined at this time. We will assume your application is already uploaded to the Android Market.
Step 2: Select the Application to Manage
On your Android Market Developer dashboard, you should see all Android Market listings when you login to your account. Choose the application you want to manage by clicking on its name. This will bring you to the Product details tab of your application's profile, where you can upload screenshots and other information for the application's market listing. The compatible devices are based on the latest APK file, so make sure this file is up to date before you configure any specific publication options.
Step 3: Configure the Publishing Options
Scroll down the Product details tab to the Publishing Options section. At the very bottom of this section, there is a configuration option called Supported Devices. By default, this section will show the number of devices that match the configuration defined by your application's Android manifest file. For example, this section might look like Figure 1.
Step 4: Excluding Specific Devices
To exclude specific devices, click on the Show devices link next to the sentence that states how many devices your application is available to. This launches the Device Availability dialog, which lists all the devices that the Android Market will currently publishes your application to. By default, this list is organized by manufacturer. So, for example, I could decide I didn't want my app on my Asus Transformer Prime by selecting it from the list of available devices, as shown in Figure 2.
If Asus decided to ship a new version of the Asus Transformer Prime, like an Asus Prime II: Deceptipad (see what we did there?) or something, your application would automatically include it until you came in and excluded it manually (assuming it was compatible with the Android manifest file settings). New devices are added on a regular basis, usually within two weeks of release.
Once you return to the Publishing Options, you will see that it indicates that you are manually excluding devices, as shown in Figure 3 below:
Step 5: Searching for Devices
You can use the Device Availability dialog to search for specific devices by manufacturer, name, or device brand name.
The Android Market development team is constantly improving the developer dashboard for application management. Normally, developers should simply configure the proper Android manifest file settings in order to ensure their applications are published to compatible devices. However, there are some valid reasons why a developer might want to "blacklist" or exclude specific devices when they publish an application. This feature is available in the Android Market developer dashboard, where the developer can manually exclude specific devices.
Do you blacklist any devices for technical reasons? If so, which ones and why?
About the Authors
Mobile developers Lauren Darcey and Shane Conder have coauthored several books on Android development: an in-depth programming book entitled Android Wireless Application Development, Second Edition and Sams Teach Yourself Android Application Development in 24 Hours, Second Edition. When not writing, they spend their time developing mobile software at their company and providing consulting services. They can be reached at via email to firstname.lastname@example.org, via their blog at androidbook.blogspot.com, and on Twitter @androidwireless.