Nass
Nass

Reputation: 51

How to set minimum screen size?

I have created new app, which not for phones. I was based my app to 7" tablet devices. When I try put my app in play store it show, that my is supported to 2000 android devices, but not all is tablets. Acctually, I don't want google all it devices and set filters, you know why!

How I can progammatically declare mininum screen size in my app, like I can set minimun sdk level.

Update:

I was set in AndroidManifest.xml <compatible-screens> and <supports-screens> like that:

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


<compatible-screens>
    <screen android:screenSize="xlarge" android:screenDensity="xhdpi"/>
    <screen android:screenSize="xlarge" android:screenDensity="ldpi"/>
    <screen android:screenSize="xlarge" android:screenDensity="hdpi"/>
    <screen android:screenSize="xlarge" android:screenDensity="mdpi"/>


</compatible-screens>

Now my app is only for 7+ inches tablets.

Upvotes: 2

Views: 5562

Answers (2)

DjHacktorReborn
DjHacktorReborn

Reputation: 2928

you can define in manifest like this for more detail on mutliScreenSupport

 <manifest ... >
        <supports-screens android:requiresSmallestWidthDp="600" />
        ...
    </manifest>

For market filter you need to use <compatible-screens> More Details

Upvotes: -2

CommonsWare
CommonsWare

Reputation: 1006664

You need to use <supports-screens> as DJHacktorReborn suggested, but not just android:requiresSmallestWidthDp, because the Play Store does not use that for filtering.

Instead, use:

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

See the documentation for more.

Upvotes: 10

Related Questions