How to ensure an Android app can only be run on a tablet?

孤者浪人 提交于 2019-11-28 05:10:00

问题


My Android app is specifically designed for tablet, and I do not want it to run on mobile phones.

How to ensure the app can only be run on a tablet ?

Thanks.


回答1:


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



回答2:


Other question got linked as a duplicate, so here is the alternative answer:

Yes go into the android market publisher page.

  • Make sure your app is uploaded.

  • Click on your app name.

  • Scroll down to where it says 'Show devices'.

  • Click that and you can exlude all mobile phones from downloading your app.

Failing that you can set some parameters in your manifest for screen size etc, but this is less reliable.




回答3:


Set the min and target SDK version in the manifest file to 11.

<uses-sdk android:minSdkVersion="11" android:targetSdkVersion="11"></uses-sdk>

Or if editing in Eclipse, select Uses Sdk in Manifest Extras and enter them there.



来源:https://stackoverflow.com/questions/5595370/how-to-ensure-an-android-app-can-only-be-run-on-a-tablet

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