Android app Only For Phones

Deadly 提交于 2019-12-05 15:13:53

The answer for this always brings up the question of what you define as a "tablet". Do you include things like the Galaxy Note? It's still technically a phone but it's kind of on the borderline. My question would be what conditions make you want to restrict it? If you simply want to require that it be able to make calls, you can add a feature tag to your manifest:

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

Which will require the device to have the dialer and a data network (which should exclude a large majority of tablet devices).

You can specify which devices should see your app on Google Play in your AndroidManifest :

<compatible-screens>
    <screen android:screenSize=["small" | "normal" | "large"] />
</compatible-screens>

By removing xlarge, you remove all the 10" Tablet.

For info :

  • xlarge screens are at least 960dp x 720dp
  • large screens are at least 640dp x 480dp
  • normal screens are at least 470dp x 320dp
  • small screens are at least 426dp x 320dp

More infos on Android developer site : - http://developer.android.com/guide/topics/manifest/compatible-screens-element.html - http://developer.android.com/guide/practices/screens_support.html#range

use compatible-screens on your manifest

More here : http://developer.android.com/guide/practices/screens-distribution.html

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