Manifest screen support Entry for Device only and Tablet Only

10,295

Solution 1

After trying all possible combination of support screen and SDK version i am still not able to restrict 10 inch tablet device to download that application.

If you just want to exclude 10 Inch tablet device just exclude all tablet device manually from supporting device list.

If you have another build for the same application upload that build too and keep its version code higher than device build. Version code must not be conflict in any case. Because if multiple apk support for any device the higher version apk will support that device.

When i upload both build in my google account following note/warning appears to help me:

"Warning: Multiple active APKs support some of the same devices. If a device is supported by more than one APK, it will receive the one with the higher version."

and following the manifest entry of my application:

for Device Build:

<uses-sdk
android:minSdkVersion="6"
android:targetSdkVersion="8" />


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

For Tablet Build:

<uses-sdk
android:minSdkVersion="6"
android:targetSdkVersion="8" />


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

Solution 2

You should use this attribute in your manifest

android:largestWidthLimitDp="enter mobile pixel value which above you want restrict."

<supports-screens
    android:anyDensity="true"
    android:largeScreens="true"
    android:normalScreens="true"
    android:resizeable="true"
    android:largestWidthLimitDp="500"
    android:smallScreens="true"
    android:xlargeScreens="false" />
Share:
10,295
Krishnakant Dalal
Author by

Krishnakant Dalal

I have more than 5.5 years of mobile application development experience. I also have a good hand on jQuery, Sencha and other phonegap framework. 

I enjoy designing, building and maintaining clean, professional, user friendly Mobile Apps. 

I have made use of SQLite database,ORM and APIs of SNS(Facebook, Twitter, Linked In, Youtube etc.), Google Maps, GPS, Communication(Wifi/3G/4G), Play with all type of JSON, XML response, Media API, Location API etc.

Updated on June 04, 2022

Comments

  • Krishnakant Dalal
    Krishnakant Dalal almost 2 years

    What should be the manifest entry of an Android application which supports only device not tablet. Device size can be vary but the maximum should be 7 Inch.

    I have developed an application different build for device and tablet now i want to launch both build in market but following manifest entry supports 10 Inch tablet too.

    <uses-sdk
        android:minSdkVersion="6"
        android:targetSdkVersion="8" />
    
    
    <supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:resizeable="true"
        android:smallScreens="true"
        android:xlargeScreens="false" />
    

    I want to restrict user to download this build on 10 Inch Tablet, and 10 Inch tablet build should not be download on other than 10 Inch tablet.

    Please suggest me the perfect manifest entry for this.