我想让我的应用只能在手机屏幕尺寸小于5.5英寸的设备上使用。如何限制我的应用在Play商店的平板电脑上显示?
答案 0 :(得分:2)
您还可以根据设备尺寸声明。
对于您的示例,您可以尝试将最大宽度设置为600 (non-tablet)
:
<supports-screens android:largestWidthLimitDp="600"/>
以下是基于min width
<!-- Support only devices with min 600dp witdth (Tablets)-->
<supports-screens android:requiresSmallestWidthDp="600" />
答案 1 :(得分:0)
这将有效 -
<manifest ... >
<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" />
<!-- 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" />
</compatible-screens>
...
<application ... >
...
<application>
</manifest>
等方式
<manifest ... >
<supports-screens android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="false"
android:xlargeScreens="false"
android:largestWidthLimitDp="600"
/>
...
<application ... >
...
</application>
</manifest>
了解更多信息 - Click here
答案 2 :(得分:0)
使用以下设置。这似乎是正确过滤平板电脑,仅包括Galaxy s6,nexus 6等手机。
<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" />
<!-- 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="560" />
<screen android:screenSize="normal" android:screenDensity="640" />
</compatible-screens>
&#13;