diff options
Diffstat (limited to 'docs/html/training/multiple-apks/api.jd')
-rw-r--r-- | docs/html/training/multiple-apks/api.jd | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/docs/html/training/multiple-apks/api.jd b/docs/html/training/multiple-apks/api.jd index d8588d4..8b731bd 100644 --- a/docs/html/training/multiple-apks/api.jd +++ b/docs/html/training/multiple-apks/api.jd @@ -44,7 +44,7 @@ How to have your (Cup)cake and eat it too</a></li> </div> -<p>When developing your Android application to take advantage of multiple APKs on Android Market, +<p>When developing your Android application to take advantage of multiple APKs on Google Play, it’s important to adopt some good practices from the get-go, and prevent unnecessary headaches further into the development process. This lesson shows you how to create multiple APKs of your app, each covering a slightly different range of API levels. You will also gain some tools @@ -198,7 +198,7 @@ initialization procedures that don’t change much from APK to APK.</p> <h2 id="AdjustManifests">Adjust the Manifests</h2> -<p>When a user downloads an application which uses multiple APKs through Android Market, the correct +<p>When a user downloads an application which uses multiple APKs through Google Play, the correct APK to use is chosen using two simple rules:</p> <ul> <li>The manifest has to show that particular APK is eligible</li> @@ -278,19 +278,20 @@ green ≥ blue. Therefore we can effectively collapse the chart to look lik </table> <p> -Now, let’s further assume that the Red APK has some requirement on it that the other two don’t. The -Market Filters page of the Android Developer guide has a whole list of possible culprits. For the +Now, let’s further assume that the Red APK has some requirement on it that the other two don’t. +<a href="{@docRoot}guide/appendix/market-filters.html">Filters on Google Play</a> page of +the Android Developer guide has a whole list of possible culprits. For the sake of example, let’s assume that red requires a front-facing camera. In fact, the entire point of the red APK is to combine the front-facing camera with sweet new functionality that was added in API 11. But, it turns out, not all devices that support API 11 even HAVE front-facing cameras! The horror!</p> -<p>Fortunately, if a user is browsing Market from one such device, Android Market will look at the +<p>Fortunately, if a user is browsing Google Play from one such device, Google Play will look at the manifest, see that Red lists the front-facing camera as a requirement, and quietly ignore it, having determined that Red and that device are not a match made in digital heaven. It will then see that Green is not only forward-compatible with devices with API 11 (since no maxSdkVersion was defined), but also doesn’t care whether or not there’s a front-facing camera! The app can still be downloaded -from Android Market by the user, because despite the whole front-camera mishap, there was still an +from Google Play by the user, because despite the whole front-camera mishap, there was still an APK that supported that particular API level.</p> <p> In order to keep all your APKs on separate "tracks", it’s important to have a good version code @@ -330,7 +331,7 @@ Red:11001, 11002, 11003, 11004...</p> </pre> <h2 id="PreLaunch">Go Over Pre-launch Checklist</h2> -<p> Before uploading to Android Market, double-check the following items. Remember that these are specifically relevant to multiple APKs, and in no way represent a complete checklist for all applications being uploaded to Android Market.</p> +<p> Before uploading to Google Play, double-check the following items. Remember that these are specifically relevant to multiple APKs, and in no way represent a complete checklist for all applications being uploaded to Google Play.</p> <ul> <li>All APKs must have the same package name</li> @@ -342,7 +343,7 @@ Red:11001, 11002, 11003, 11004...</p> </ul> <p>It’s also worth inspecting the compiled APK before pushing to market, to make sure there aren’t -any surprises that could hide your application in Market. This is actually quite simple using the +any surprises that could hide your application on Google Play. This is actually quite simple using the "aapt" tool. Aapt (the Android Asset Packaging Tool) is part of the build process for creating and packaging your Android applications, and is also a very handy tool for inspecting them. </p> @@ -370,10 +371,10 @@ densities: '120' '160' '240' supports-screens and compatible-screens, and that you don’t have unintended "uses-feature" values that were added as a result of permissions you set in the manifest. In the example above, the APK won’t be visible to very many devices.</p> -<p>Why? By adding the required permission SEND_SMS, the feature requirement of android.hardware.telephony was implicitly added. Since API 11 is Honeycomb (the version of Android optimized specifically for tablets), and no Honeycomb devices have telephony hardware in them, Market will filter out this APK in all cases, until future devices come along which are higher in API level AND possess telephony hardware. +<p>Why? By adding the required permission SEND_SMS, the feature requirement of android.hardware.telephony was implicitly added. Since API 11 is Honeycomb (the version of Android optimized specifically for tablets), and no Honeycomb devices have telephony hardware in them, Google Play will filter out this APK in all cases, until future devices come along which are higher in API level AND possess telephony hardware. </p> <p>Fortunately this is easily fixed by adding the following to your manifest:</p> <pre> <uses-feature android:name="android.hardware.telephony" android:required="false" /> </pre> -<p>Once you’ve completed the pre-launch checklist, upload your APKs to Android Market. It may take a bit for the application to show up when browsing Android Market, but when it does, perform one last check. Download the application onto any test devices you may have, to make sure that the APKs are targeting the intended devices. Congratulations, you’re done!</p> +<p>Once you’ve completed the pre-launch checklist, upload your APKs to Google Play. It may take a bit for the application to show up when browsing Google Play, but when it does, perform one last check. Download the application onto any test devices you may have, to make sure that the APKs are targeting the intended devices. Congratulations, you’re done!</p> |