Android app Only For Phones

有些话、适合烂在心里 提交于 2019-12-07 07:32:24

问题


Is it possible to create Android app which can be downloaded from google play only by phone not tablet?


回答1:


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).




回答2:


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




回答3:


use compatible-screens on your manifest

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



来源:https://stackoverflow.com/questions/12319476/android-app-only-for-phones

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