Google Play支持的设备

时间:2015-05-26 15:23:33

标签: android google-play android-manifest

我如何只允许智能手机下载该应用并排除所有平板电脑设备?

我现在所拥有的是以下内容:

    <screen android:screenSize="small" android:screenDensity="ldpi" />
    <screen android:screenSize="small" android:screenDensity="mdpi" />
    <screen android:screenSize="small" android:screenDensity="hdpi" />
    <screen android:screenSize="small" android:screenDensity="xhdpi" />
    <screen android:screenSize="small" android:screenDensity="480" />
    <screen android:screenSize="small" android:screenDensity="640" />

    <!-- all normal size screens -->
    <screen android:screenSize="normal" android:screenDensity="ldpi" />
    <screen android:screenSize="normal" android:screenDensity="mdpi" />
    <screen android:screenSize="normal" android:screenDensity="hdpi" />
    <screen android:screenSize="normal" android:screenDensity="xhdpi" />
    <screen android:screenSize="normal" android:screenDensity="480" />
    <screen android:screenSize="normal" android:screenDensity="640" />

//编辑 我知道列表中有大部分手机。但我错过了nexus 6,而支持4。还支持nexus 7,这在我的情况下并不理想。

2 个答案:

答案 0 :(得分:2)

Android开发者网站已过时。它只显示xhdpi,而我们已经有xxhdpi。这就是我用来支持所有手机并排除平板电脑的内容:

<compatible-screens>
    <!-- all small size screens -->
    <screen android:screenSize="small" android:screenDensity="ldpi" />
    <screen android:screenSize="small" android:screenDensity="mdpi" />
    <screen android:screenSize="small" android:screenDensity="hdpi" />
    <screen android:screenSize="small" android:screenDensity="xhdpi" />
    <screen android:screenSize="small" android:screenDensity="480" />
    <screen android:screenSize="small" android:screenDensity="640" />

    <!-- all normal size screens -->
    <screen android:screenSize="normal" android:screenDensity="ldpi" />
    <screen android:screenSize="normal" android:screenDensity="mdpi" />
    <screen android:screenSize="normal" android:screenDensity="hdpi" />
    <screen android:screenSize="normal" android:screenDensity="xhdpi" />
    <screen android:screenSize="normal" android:screenDensity="480" />
    <screen android:screenSize="normal" android:screenDensity="640" />
</compatible-screens>

我发现它here.

我在一个月前将这个用于我的应用程序。

还要添加nexus 6添加这些行:

<screen android:screenSize="normal" android:screenDensity="560" />
<screen android:screenSize="small" android:screenDensity="560" />

有关详细信息,请参阅以下评论。

答案 1 :(得分:0)

您希望在Manifest中使用Compatible Screens元素。

http://developer.android.com/guide/topics/manifest/compatible-screens-element.html

这允许您为各种屏幕尺寸和分辨率指定任何限制。

此处还提供了Google提供的指南:http://developer.android.com/guide/practices/screens_support.html#range