简体   繁体   中英

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. 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" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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