How do I restrict my Android app to non-tablets?

守給你的承諾、 提交于 2020-01-12 08:37:07

问题


I have seen this link which show how I can restrict download to only tablets, but I am looking the other way round.

How can I restrict my app to only download on mobiles and not on tablets? (It's the requirement from the client.)


回答1:


Add a <compatible-screens> element to your manifest, outlining the specific screen sizes and densities that you support.




回答2:


Another possible solution you could use is to add the following to manifest:

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

This will restrict the apk to being installed on devices that the ability to make phone calls(i.e. non-tablets).




回答3:


CommonsWare's Answer is 100% correct.

You have other options also, Use

supports-screens

Or Manually filter the tablet devices in Google Play. This will be tedious task.



来源:https://stackoverflow.com/questions/10142755/how-do-i-restrict-my-android-app-to-non-tablets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!