简体   繁体   English

如何仅在手机上而不是选项卡上运行android应用

[英]how to run android app only on phone ,not on tab

I have developed one android app which intended to run only on phone.But it also run on Tab I have made changes in Manifest file as following- 我已经开发了一个仅可在手机上运行的android应用程序,但也可以在Tab上运行。我对清单文件进行了如下更改:

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

But it doesn't work. 但这是行不通的。 What is the way to setup android app using code which only run on phone, not on android tab. 使用仅在手机而非android选项卡上运行的代码设置android应用的方法是什么?

Just add this line in the Manifest.xml : 只需在Manifest.xml中添加以下行:

<uses-feature android:name="android.hardware.telephony"/>

If the device has no dialer and a data network, this one will be excluded from GooglePlayStore . 如果设备没有拨号器和数据网络,则该设备将从GooglePlayStore中排除。

Check this: Google Play Filtering 检查一下: Google Play过滤

On the other hand, if you change the supports-screens property you will have problems with devices with high density displays. 另一方面,如果更改了supports-screens属性,则具有高密度显示器的设备将出现问题。

Good luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM