Search code examples
androidfiltergoogle-playandroid-manifesttablet

Filters for phone and tablets in Google Play


I want to put filter to my application for Google Play.
I just want to display my application to phone devices only and not to tablet users.

So what kind of filter i can put except <screen-supports> ?
Is there any specific filter for phone or tablet or pads?


Solution

  • Declaring an App is Only for Tablets;

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

    Declaring an App is Only for Handsets

    <compatible-screens>
            <!-- all small size screens -->
            <screen android:screenSize="small" android:screenDensity="ldpi" />
            <screen android:screenSize="small" android:screenDensity="mdpi" />
            <screen android:screenSize="small" android:screenDensity="hdpi" />
            <screen android:screenSize="small" android:screenDensity="xhdpi" />
            <!-- all normal size screens -->
            <screen android:screenSize="normal" android:screenDensity="ldpi" />
            <screen android:screenSize="normal" android:screenDensity="mdpi" />
            <screen android:screenSize="normal" android:screenDensity="hdpi" />
            <screen android:screenSize="normal" android:screenDensity="xhdpi" />
        </compatible-screens>
    

    For a detailed information : http://developer.android.com/guide/practices/screens-distribution.html#FilteringHandsetApps

    Edit: No selector for xxhdpi in compatible-screens so you can use; Tablet:

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

    Phone :

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