Android manifest distinct phones from tablets

1000 views Asked by At

I have two different apks - one for phones, and it has portrait orientation, and one for tablets in landscape. Also different drawables used there. All drawables store in "drawable-nodpi" and layouts simply in "layout" folder. I want to distinct tablets from phones in my manifest, considering that tablet is everything larger then 7 inches. And the main problem is Samsung Galaxy Tab P1000. It has 7 inches display, 1024x600 resolution, so it has to be a tablet. But if i download app from Google Play it takes version for phones, cause screen density of it is "hdpi". I think base settings are correct cause Acer Iconia A100 which also has same params on hardware, but has "mdpi" density downloads version for tablets.

Can you please tell me how to distinct phones from tablets and to correct set my manifest?

3

There are 3 answers

0
Alexander On BEST ANSWER

Sorry for long time not looking here...

Single apk is absolutely not suitable for me. I've found the solution for this problem. For the apk which is only for tablets you should add the following in your manifest:

<compatible-screens>
    <screen android:screenSize="large" android:screenDensity="hdpi" />
    <screen android:screenSize="large" android:screenDensity="mdpi" />
    <screen android:screenSize="large" android:screenDensity="213" /> <!--nexus7-->
    <screen android:screenSize="xlarge" android:screenDensity="mdpi" />
    <screen android:screenSize="normal" android:screenDensity="xhdpi" />
    <screen android:screenSize="large" android:screenDensity="xhdpi" />
</compatible-screens>

And for the apk which is just for phones:

<compatible-screens>
    <screen android:screenSize="normal" android:screenDensity="hdpi" />
    <screen android:screenSize="normal" android:screenDensity="xhdpi" />
</compatible-screens>
1
Rémi F On

Have you tried to build a single APK ? It should be easier. Please have a look to this official Guide.

1
Joseph Bolade Caxton-Idowu On

I am having the same problem. The Galaxy tab P1000 is a Large screen and picking up from the Hdpi but in real life it is Mdpi. Using the layouts from HDPI looks horrible, I think this problem is from samsung...