Moussa
Moussa

Reputation: 851

How to Make Android application not compatible with tablets?

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?

Upvotes: 5

Views: 778

Answers (3)

Kumar Vivek Mitra
Kumar Vivek Mitra

Reputation: 33544

This will work.............

Use compatible-screens

see this link:

http://developer.android.com/guide/practices/screens-distribution.html#FilteringHandsetApps

Specially read this section:

Caution: If you use the element for the reverse scenario (when your application is not compatible with larger screens) and set the larger screen size attributes to "false", then external services such as Google Play do not apply filtering. Your application will still be available to larger screens, but when it runs, it will not resize to fit the screen. Instead, the system will emulate a handset screen size (about 320dp x 480dp; see Screen Compatibility Mode for more information). If you want to prevent your application from being downloaded on larger screens, use

Upvotes: 0

hovanessyan
hovanessyan

Reputation: 31473

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.

Upvotes: 5

BlackHatSamurai
BlackHatSamurai

Reputation: 23503

This can be done from the Android market. There are setting in there that you can set to keep your app from being viewed by specific devices, including tablets. You can use the restrictions you set maxSdkVersion 10, and others, to set boundries for that apps that can view your app once you send it to the marketplace. If the device does not meet the criteria set forth by you, the app won't be seen by the device searching for it.

This link might give you some added value: http://developer.android.com/guide/google/play/filters.html

Hope this helps you!

Upvotes: 0

Related Questions