Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Make Android application not compatible with tablets?

Tags:

android

I am going to make a tablet specific version of my app and I want to stop my phone app being compatible with tablets.

I have tried making my application with maxSdkVersion 10 and I have also tried support screens xlarge false etc...

Could someone tell me how to make my application incompatible with tablets?

like image 929
Moussa Avatar asked Jul 03 '12 16:07

Moussa


1 Answers

One solution (that might not cover all devices, I don't know) would be to filter devices based on screen size and density. Table1 here shows you all the possibilities.

In your manifest file, you can try something like:

<compatible-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" />
    <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>

I think combination of the two (Android market information + manifest) will get you decent amount of tablet devices that will be ruled out.

like image 144
hovanessyan Avatar answered Oct 29 '22 16:10

hovanessyan