I am publishing my app in the Play store and i don't want it to be available for tablets. How can i make it happen?
I don't want to manually exclude every single tablet within the developer console of android but i really need my application to run exclusively on smartphone.
EDIT: I did as you suggested but here's the result:
And for further explanation: i need my app to run on devices that normal people call smartphone and not on devices that normal people call tablets... e.g. it has to run on "Galaxy Note 2" but not on "Galaxy Tab"
SOLVED Thanks to @CommonsWare:
I had to set the following tags in my manifest:
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="9"/>
and:
<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" />
<!-- all large size screens -->
<screen android:screenSize="large" android:screenDensity="ldpi" />
<screen android:screenSize="large" android:screenDensity="mdpi" />
<screen android:screenSize="large" android:screenDensity="hdpi" />
<screen android:screenSize="large" android:screenDensity="xhdpi" />
</compatible-screens>
And do the following: Right click on project -> properties -> android -> select a target greater than 8
Exclude a deviceOpen Play Console and go to the Device catalog page (Release > Reach and devices > Device catalog). Select the device model which you wish to exclude and go to the details page. At the top right of your screen, select Exclude device.
If feature is not supported in tablet but is declared in manifest file without explicitly declaring as android:required="false" , then that tablet will be filtered out from Google Play. Show activity on this post. Add below code into your android manifest. xml file for make application tablet compatible.
Yes, Most of the apps works on both Smartphone and Android Tablet. But some features may not works on Tablet which are specially developed for smartphones and some features may not Works on smartphones which are specially developed for Tablets.
http://developer.android.com/guide/practices/screens-distribution.html#FilteringHansetApps
...you can use the element to manage the distribution of your application based on combinations of screen size and density. External services such as Google Play use this information to apply filtering to your application, so that only devices that have a screen configuration with which you declare compatibility can download your application.
The sample <compatible-screens>
element from that page:
<manifest ... > <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> ... <application ... > ... <application> </manifest>
However, I would recommend also adding lines for a density of xxhdpi
, as such devices are shipping now (Droid DNA, Xperia Z, HTC Butterfly, etc.).
UPDATE
First, with respect to your build errors, if you read the documentation for the <compatible-screens>
element, you will notice that it was added in API Level 9, and for some strange reason, you build target is set older than that.
Second, with respect to:
i need my app to run on devices that normal people call smartphone and not on devices that normal people call tablets... e.g. it has to run on "Galaxy Note 2" but not on "Galaxy Tab"
This is not possible, simply because you do not have a concrete definition of what you do and do not want your app shipping on.
There are ~8 billion "normal people" on the planet. You are welcome to interview each one of them and ask them what they think the Galaxy Note 2 is. Some will say a phone. Some will say a tablet. Some will say a "phablet", which will not be useful. Some will chase you out of their homes, claiming that you have brought some light-emitting demon into their midst (this too will not be useful, and may be painful if they have stones handy to throw).
If, at some point in time in the future, you come up with a scientific definition of what you do and do not want to ship your device on, ask a fresh StackOverflow question. By "scientific definition", I mean an algorithm that can be universally applied, by all people on all devices, to determine what you do and do not want your app on.
(note that by "all people", I am excluding those who might consider you to be a demon-monger)
For example:
"I want to ship on all devices that have telephony capability, regardless of screen size"
"I want to ship on all devices that have a screen size smaller than such-and-so many inches on its smallest side:
Use Support screen tag in manifest file is wrong method. Alway use <compatible-screens>
to make your app not available to tablet.
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="false"
android:xlargeScreens="false"
android:resizeable="false" />
Caution
If you use the element for the above 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 as suggested by @CommonsWare.
Use tag for exclude your app to run on tablet.
<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 those new to the thread, use
<uses-feature android:name="android.hardware.telephony" required="true"/>
Source (https://paramsen.github.io/exclude-tablets/)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With