How to upload Multiple APK in Android Market

Android Market supports multi APK from July, as Google said, this is good solution help developers manage their products more effectively in Android Market, and help users to avoid compatible problem. I havnt noticed this news until many users complained me that they can not download my app from Google Market, they got "Compatibility Problem", but the app ran well in their devices before July.

I went to the Market support forum, many users are still complaning same problem, "Why not just let me download, i know how to install the APK!". OK, we can not change Google's I/O system, but we can upload multi apks to Market, even it burdens our work. But i still dont understand why Supporting Multiple
Screens
, is so difficult in Android, why Android can not decide it automatically, why developers MUST set it manually, boring...

 Most of the compatibility problems are caused by Screen size, so i give here one example.

I have one app, i 'd like to let it support all the SDK version from API v3 - 99999(example), SDK 1.5 to 3.xxxx, you need compile at least three APK. I leave comment node in AndroidManifest.xml to let you see it clear

1. for 1.5+ , need use SDK 1.5
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="net.mobabel.myapp"
      android:versionCode="800"
      android:versionName="1.01">

    <uses-sdk android:minSdkVersion="3" />
<!--  
    <uses-sdk android:minSdkVersion="4" />
    <supports-screens
          android:largeScreens="true"
          android:normalScreens="true"
          android:smallScreens="true"
          android:anyDensity="true" />
-->

2. for 1.6+ need use SDK 1.6
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.mobabel.myapp"
android:versionCode="801"
android:versionName="1.01">
<!--
<uses-sdk android:minSdkVersion="3" />
-->  
<uses-sdk android:minSdkVersion="4" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true" />

3. for 2.3+  need use SDK 2.3
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.mobabel.myapp"
android:versionCode="802"
android:versionName="1.01">
<!--
<uses-sdk android:minSdkVersion="3" />
-->  
<uses-sdk android:minSdkVersion="4" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
          android:xlargeScreens="true"
android:anyDensity="true" />

=========or simply==============
if use minSdkVersion="9", the xlargeScreens will be set to true as default

<uses-sdk android:minSdkVersion="9" />

 

Pay attention:
The versionCode MUST be increased by the SDK version! Bcecause:

If you use this characteristic as the factor to distinguish multiple APKs, then the APK
with a higher android:minSdkVersion value must have a higher android:versionCode
value. This is also true if two APKs overlap their device support based on a different supported
filter. This ensures that when a device receives a system update, Android Market can offer the user
an update for your application (because updates are based on an increase in the app version code).
This requirement is described further in the section below about Rules for
multiple APKs
.

Refer to:  http://developer.android.com/guide/market/publishing/multiple-apks.html

 


Blog