Jeff Hines, Kindle Fire test team, and Chirag Mehta, a2z Developer Center Inc., an Amazon.com company, are our bloggers for this post.
This fourth post in our Top 10 App Optimizations for Kindle Fire series involves optimizations that allow for successful installation on Kindle Fire.
While all too common, installation failures are easily preventable. Rather than by coding errors, installation failures result from a misunderstanding of the device software, features, and capabilities. This post contains helpful optimizations that address prominent issues preventing installation on Kindle Fire.
What version of the Android platform does Kindle Fire utilize?
When developing an app exclusively for Kindle Fire, ensure that your app is developed using the correct Software Development Kit (SDK) version. Many apps fail to install because they were developed to operate within a different version of the Android SDK platform.
If your app requires a different SDK version than what is used by Kindle Fire, then you will see an error similar to the following:
“…Could not parse package (at Binary XML file line #11): Requires newer sdk version #13 (current version is #10)”
To properly optimize your app for Kindle Fire, you should specifically target Android 2.3.4 - API Level 10.
If you have designed your app to install on Kindle Fire and multiple devices running other versions of the Android SDK, simply adjust the minimum Android Program Interface (API) Level within your manifest:
Be aware that you can set the maximum API value by utilizing android:maxSdkVersion=”X”. However, we do not recommend blocking installation on future versions of the Android SDK, as all newer versions of the platform are backwards compatible.
If you intend to have your app exclusive to Kindle Fire, then you may simply equalize the minimum and target values:
For more information on declaring API values within your manifest, visit http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
Kindle Fire and Google Mobile Services (GMS)
If you have packaged your app using Google Mobile Services (GMS) such as the Google Maps library, then your app will not install on Kindle Fire. Unlike some other Android devices, GMS are not present on Kindle Fire.
When trying to install an app that requires GMS, you may encounter the following error:
“…requires unavailable shared library com.google.android.maps; failing!”
While the Google Maps library is not present on the Kindle Fire, you may still connect to Google Maps via Wi-Fi. Otherwise, if your app must have offline mapping, then we recommend developing your app to utilize an alternative mapping service.
If your app is fully functional without GMS support, we recommend disabling the service entirely by removing the line of code from the manifest that links to the library.
Depending on your app’s functionality, you may also need to modify your mapping features to gracefully degrade (e.g., with an error message such as “This feature is not currently available on this device”). If you plan to implement an alternate mapping service in an updated version, then you might use a message such as, “This feature is not currently available at this time.”
Be aware that if your app also uses in-app purchasing technology powered by Google Mobile Services, this functionality will not work on Kindle Fire. Amazon now directly offers an alternative In-App Purchasing API that allows easy access to purchasable digital content and subscriptions. Please refer to our In-App Purchasing section of the Developer FAQ for more information.
Continue to check back in for our next post in this series which will cover optimizations that target graphical performance on Kindle Fire.