Troubleshooting Android Application Compatibility

The diversity of Android devices can make ensuring compatibility a challenge when developing mobile applications. Google Play applies filters so that users can only install those applications that are compatible with their devices. An incompatible feature can limit the users you reach with an Android application. The Google Play Developers Console provides a handy feature to examine what devices your Android application is compatible with, and troubleshoot incompatibilities.

To start, if you haven’t added your application to Google Play yet, add a new application in the Google Play Developer Console. After clicking “+ Add new application” you should be presented with a dialog to choose your application language, provide your application title and upload your APK.

Troubleshooting Android Application Compatibility

Once you’ve uploaded your APK, you can view the details that Google Play sees from your APK.

Current APK Troubleshooting

Under “Supported devices” the number of Android devices that Google Play recognizes as compatible is displayed. By clicking the “See list” link underneath this you can see which specific device models are supported and which are not (as well as any devices that may have been manually excluded).

Troubleshooting Device Compatibility

To support as many users’ devices as possible, it’s helpful to understand how Google Play determines what features your Android application requires. Google Play compares features required by the application to the features available on the given device in hardware or software. The feature requirements examined by Google Play may be explicit or implicit.

An explicitly declared feature is one that your application declares in a <uses-feature> element. The feature declaration can include an attribute to specify whether the application requires the feature and cannot function properly without it (android:required=”true”), or whether the application uses the feature if available, but is designed to still operate without it (android:required=”false”).

An implicit feature is not declared in a <uses-feature> element in the manifest file, but implied by request for hardware access with the <uses-permission> element. If your application requests a hardware-related permission, Google Play assumes that the application requires the underlying hardware features, and will apply filtering for these hardware capabilities.

For example, say your application requests the ACCESS_FINE_LOCATION permission for high-accuracy location updates. This implies the android.hardware.location.gps and android.hardware.location features are required. Without <uses-feature> elements specified for these features, Google Play will only allow the app to be installed on devices that support location services and have GPS hardware.

Now, say your application prefers high-accuracy location updates, but can operate without this (for example, fallback to lower-accuracy network-based location awareness), then you can specify that the android.hardware.location.gps is not required. Now your application will install on devices that do not include GPS hardware features.

For this example, the configuration in your application manifest would include:

<manifest …>
 ...
 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
 <uses-feature android:name="android.hardware.location.gps" 
               android:required="false" />
 ...
</manifest>

After adjusting the permission and feature requests in your Application manifest, you can rebuild and upload a new APK to the Google Play Developer console, and see how the supported device list has changed. This technique can be useful to identify permissions and features that limit compatibility with specific hardware devices, and help your application reach as many Android users as possible.

Leave a Reply

Your email address will not be published.

top