简体   繁体   English

支持手机,平板手机,但不支持平板电脑

[英]Support mobile phones, phablets but not tablets

I would like my application to support mobiles and phablets only not the tablets. 我希望我的应用程序仅支持手机和平板手机,而不支持平板电脑。 I have used the following cod ein my manifest file to support mobile phones and phablets. 我在清单文件中使用了以下编码来支持手机和平板手机。

 <compatible-screens>

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

I am not sure if the above code will support phablets or not. 我不确定上面的代码是否支持平板手机。 Is this correct ? 这个对吗 ?

Edit 编辑

Basically I just want to support devices which supports sim card. 基本上我只想支持支持SIM卡的设备。 Is there any other way to find out ? 还有其他找出方法吗?

You can specify in your manifest that you wish only to support devices with Telephony feature's available. 您可以在清单中指定仅希望支持具有电话功能的设备。 As mentioned in the comment on question, it is not a fool proof technique to eliminate all the tablets. 正如在评论中提到的那样,消除所有药片不是万无一失的技术。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM