Reputation: 1305
I am developing a tablet app. How i can prevent installation of apk in phones. I added following lines in manifest.
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<supports-screens
android:largeScreens="true"
android:normalScreens="false"
android:requiresSmallestWidthDp="600"
android:smallScreens="false"
android:xlargeScreens="true" />
But it can install on phones too. Is it will be ok, when the app is live?
Upvotes: 1
Views: 1085
Reputation: 2878
You will find this link awesome: http://android-developers.blogspot.com/2011/09/preparing-for-handsets.html
The problem with what we call "tablet" is that the definition is not the same for evryone. I think about the Archos 5IT that is the same size than a phone but branded with "tablet" name. Same issue with Dell Streak.
I would personnaly not call that a tablet..
So if you want to restrict to 7 or 5 inches devices, you should use xlargeScreens and largeScreens.
(There is also a bug in HTC flyer - 7 inches- that uses largeScreens, blame HTC)
I guess that playing with Screen size in Manifest will fit your needs:
<supports-screens android:smallScreens="false"
android:normalScreens="false"
android:largeScreens="false"
android:xlargeScreens="true"
android:anyDensity="true"
android:requiresSmallestWidthDp="600"
android:compatibleWidthLimitDp="integer"
android:largestWidthLimitDp="integer"/>
Upvotes: 2