Phil
Phil

Reputation: 4069

Limit app to handsets only - Android

I'm working on an app, that by design and client request, is only to be available on handset devices. I've looked into how to limit the app to handsets only on the following URL http://developer.android.com/guide/practices/screens-distribution.html#FilteringHansetApps, however I'm wondering what sizes I need to specify to encompass all handset screen sizes and resolutions. I realize that some handset devices have large screens, and I want to be sure I do not forget to include one. Would it be safe to assume that the following would limit my app so that it could only be downloaded on handset devices, and not on tablets?

<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>

Or should I also include the "large" screen size? Any thoughts or suggestions are greatly appreciated! Thank you!

Upvotes: 0

Views: 231

Answers (2)

Stephane Mathis
Stephane Mathis

Reputation: 6612

I was in the same case recently.

Yes, you're just missing the xxhdpi screens. At the moment you can't use xxhdpi for the screenDensity, but if you use 480 it works. So just add

<screen android:screenSize="small" android:screenDensity="480" />
<screen android:screenSize="normal" android:screenDensity="480" />

What is great, is that phone around 5" are still in the "normal" screen size.

Upvotes: 5

TronicZomB
TronicZomB

Reputation: 8747

That will cover the majority of phones, though you may have to have special cases for certain phones such as the Galaxy S4 requires:

<screen
android:screenDensity="480"
android:screenSize="normal" /> 

There may be other phones that require special cases as well though I do not know of them.

The large screen size will include tablets into the allowed devices for the application.

Upvotes: 1

Related Questions