androidgoogle-playmultiple-apk

Multiple APK Rules..?


I have build an android application using multiple apk files. I have followed the rules ie, unique version code, same package name, signed with the same certificate key, same apk file name. Now in order to distinguish for different screen resolution, I have written following codes in manifest file:

For 240x320:

<compatible-screens >
    <screen android:screenSize="small" android:screenDensity="ldpi"/> 
</compatible-screen 

For 320x480:

<compatible-screens >
   <screen android:screenSize="normal" android:screenDensity="mdpi"/>
</compatible-screens>

For 480x800:

<compatible-screens >
    <screen android:screenSize="normal" android:screenDensity="hdpi"/>
</compatible-screens>

For 720x1280:

<compatible-screens >
    <screen android:screenSize="normal" android:screenDensity="xhdpi"/>
</compatible-screens>

Please let me know if there is something wrong in this. Because if I am uploading multiple apk in google play, now when the user will download this application the appropriate apk should get download automatically . For eg if user is downloading this app using Google Nexus, then apk of 720x1280 should get downloaded.

Thank you in advance


Solution

  • AFAIK it is not a Good idea. Android has lots of different resolutions, and it is really very difficult to

    create a different APK for each resolution and also the make sure about user download the right apk.

    It'd be much better to just try to follow the Developer Guide's advice in creating resources appropriate for a wide variety of screens.

    Officially Written on above link :

    Beware, however, that publishing multiple APKs for the same application is considered an advanced feature and most applications should publish only one APK that can support a wide range of device configurations. Supporting multiple screen sizes, especially, is within reason using a single APK, as long as you follow the guide to Supporting Multiple Screens.

    Best way is to provide drawables/layout for different resolutions rather than creating different apk depending upon resolutions. Universal application for all resolutions is best than different app for different resolutions.

    Read this for better understanding.