Android的:禁止安装在平板电脑上的应用 [英] Android: Disable to install app on tablets

查看:862
本文介绍了Android的:禁止安装在平板电脑上的应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作应该只安装在手机和平​​板电脑没有应用。

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?

我正在读这篇文章,但似乎pretty老对我说:
分配给特定的屏幕

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

他们谈论的不是在所有xxhdpi或xxxhdpi分辨率和设备的屏幕大小划分。它可以工作几年前,但现在?例如的Nexus 6有6个屏幕尺寸 - 它可以被认为几乎像平板电脑

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?

推荐答案

要如果我们使用ADB安装命令来安装应用程序,这是不可能的restict应用程序的安装只片剂或手机。
此外,如果我们给标签在menifest这是只适用于谷歌Play商店过滤器,以检查这个你可以尝试以下code,把它放到你的menifest,并尝试在7寸平板电脑来安装它,它就会允许,

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

通过使用这种code谷歌Play商店的过滤器和而只有安装限制,而不是在其他情况下,作为共享的apk,还是在模拟器中安装。

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.

所以,限制应用程序安装到特定的设备,当你在市场上传APK,你需要这样做
应用程序 - >选择您的应用程序 - > APK->支持的设备|排除的设备

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

这篇关于Android的:禁止安装在平板电脑上的应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆