2014-10-30 176 views
0

我希望我的應用程序僅支持手機和平板電腦,而不是平板電腦。我在清單文件中使用了以下鱈魚來支持手機和平板手機。支持手機,平板而不是平板電腦

<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> 

我不確定上面的代碼是否支持phablets或不支持。它是否正確 ?

編輯

基本上我只是想支持支持SIM卡的設備。有沒有其他方法可以找出答案?

+0

甚至一些平板電腦支持SIM卡.. – 2014-10-30 05:59:47

+0

@ basant_matharu是的,我知道,但它沒關係。我的主要目標是現在手機和平​​板手機。 – ik024 2014-10-30 06:02:11

回答

1

您可以在清單中指定您希望僅支持具有電話號碼功能的設備。正如對問題的評論中所提到的,消除所有平板電腦並不是一種傻瓜證明技術。

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

感謝您的回覆:) – ik024 2014-10-30 06:34:22

+0

我可以確認,通過使用此功能(並排除兼容屏幕),您的應用將可用於帶有SIM卡的平板電腦。 – 2016-01-27 11:34:15