Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Disable to install app on tablets

I'm working on app that should be installed only on phones and not tablets.

I want to ask, how can I restrict to install only on phones?

I was reading this article, but it seems pretty old to me: Distributing to Specific Screens

They are not talking about xxhdpi or xxxhdpi resolutions at all and devices are divided by screen size. It could work few years ago, but now? For example Nexus 6 has 6" screen size - it can be considered almost like tablet.

Do you know any working solution?

like image 269
Stepan Sanda Avatar asked Apr 03 '15 08:04

Stepan Sanda


People also ask

How do I restrict apps to install on Android?

Uncheck the Allow users to install apps box. When unchecked, users can't access the App Store and apps bought on other devices can't download automatically. Users can still download allowed apps through the Google Device Policy app. Click Save.

What happens if I disable Package Installer?

Disabling access to the package installer will ensure that no new apps can be installed or uninstalled from the Android device.


1 Answers

To install app if we are using adb install command , it's not possible to restict app installation only to tablets or phones. Also if we give tag in menifest it's only applicable for the Google Play store filter, to check this you can try following code, put it into your menifest and try to install it in 7 inch tablet, it will allow,

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

By using this code Google play store filters and restrict while installing only, but not in other cases as sharing apk, or installing in emulator.

So, to restrict the app installation to certain device when you upload APK at market , you need to do this Applications->select your application->APK-> Supported devices | Excluded devices

like image 90
Android Team Avatar answered Sep 23 '22 19:09

Android Team