Multiple APK support for phone and tablet android

浪尽此生 提交于 2019-12-12 03:09:33

问题


I have 2 APKs with same package name. I want to upload 1 apk to support for android phone only(min sdk version 8) and different apk to support for tablet only(min sdk version 11).

for phone I have declared below code in manifest:

<supports-screens android:smallScreens="true"
              android:normalScreens="true"
              android:largeScreens="true"
              android:xlargeScreens="false"
              android:resizeable="true"
              android:anyDensity="true"/>

And for tablet:

<supports-screens
    android:largeScreens="true"
    android:normalScreens="false"
    android:requiresSmallestWidthDp="600"
    android:smallScreens="false"
    android:xlargeScreens="true" /> 

My package name is same for both app so that I can upload multiple apk. But some of the devices are of large screen, so there devices fall in both above category. So how to consider those devices as phone and allow him to download phone version and not tablet version? Or should I have to change anything in manifest file?


回答1:


You should support multiple screens in a single APK.

In your case, you can create layout-large and layout-xlarge.

Here you can read about: http://developer.android.com/guide/practices/screens_support.html

But, if you really want to publish two apks, here is the guide: http://developer.android.com/google/play/publishing/multiple-apks.html



来源:https://stackoverflow.com/questions/17946835/multiple-apk-support-for-phone-and-tablet-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!