I'm working on an application where I want to have two different APK's for Phone and Tablet. How do I restrict apk in mainifest file using support screen. I'm very confused with new attributes like android:requiresSmallestWidthDp and android:largestWidthLimitDp. Please help me out.
Asked
Active
Viewed 176 times
0
-
first you have to define, what is `phone` and what is `tablet`. How can you determine it? By which parameter? – Vladyslav Matviienko Feb 27 '17 at 12:44
1 Answers
0
you have to mention like this in manifest
<manifest ... >
<supports-screens android:smallScreens="false"
android:normalScreens="false"
android:largeScreens="true"
android:xlargeScreens="true"
android:requiresSmallestWidthDp="600" />
...
<application ... >
...
</application>
have a look at This

Manohar
- 22,116
- 9
- 108
- 144
-
I want to consider only 10 inch tablets and anything below 10 inch is Phone. – Nagaraj Wadakannavar Feb 27 '17 at 12:51
-
-
and what happens if I just specify android:xlargeScreens="true" and rest all false – Nagaraj Wadakannavar Feb 27 '17 at 12:56
-
How to check because these filters applied only for play store listing so how do test it. I know we can check using aapt command but not sure how to test. – Nagaraj Wadakannavar Feb 27 '17 at 12:57
-
I'm confused because compatible-screens tag is used for restricting an apk to phone and support-screens tag is used for restricting for Tablets – Nagaraj Wadakannavar Feb 27 '17 at 13:00
-
and minSdk = 16 in my application so I'm assuming android:requiresSmallestWidthDp="720" is sufficient. correct me if I'm wrong. – Nagaraj Wadakannavar Feb 27 '17 at 13:10
-
minSdk =16 means your app is restricted to android version above 4.1 Jelly Bean – Manohar Feb 27 '17 at 13:13