Android应用仅限于手机使用

4

是否可以创建仅限手机下载而非平板电脑的Android应用程序,可在Google Play上下载?


1
Android文档中有关于此的信息 - http://developer.android.com/guide/practices/screens-distribution.html#FilteringHandsetApps - Mario
3个回答

19

对于这个问题的答案,总是会引出一个问题,你如何定义“平板电脑”?你是否包括像Galaxy Note这样的设备?它仍然是一个技术上的手机,但它有点处于边缘地带。我的问题是,什么条件会使你想要限制它?如果你只想要求它能够进行通话,那么你可以在你的清单文件中添加一个功能标签:

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

这将需要设备具备拨号器和数据网络(这应该排除了大多数平板设备)。


这比任何其他屏幕密度修复更合适,前提是应用程序使用电话呼叫或短信功能。 - Soumya

6

您可以在AndroidManifest中指定哪些设备可以在Google Play上看到您的应用程序:

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

通过移除xlarge,您将删除所有的10英寸平板电脑。

相关信息:

  • xlarge屏幕至少为960dp x 720dp
  • large屏幕至少为640dp x 480dp
  • normal屏幕至少为470dp x 320dp
  • small屏幕至少为426dp x 320dp

更多信息请参考Android开发者网站: - http://developer.android.com/guide/topics/manifest/compatible-screens-element.html - http://developer.android.com/guide/practices/screens_support.html#range


2
Galaxy S3 很大。它是 1280 x 720 像素,但是 xhdpi。不要忘记屏幕尺寸是以 dp 而非 px 为单位的。 - Etienne

2

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接