My application is not listed for tablets

2019-05-16 13:10发布

问题:

I have uploaded to play.google.com a new application:

https://play.google.com/store/apps/details?id=development.nk.anguide

The problem is that i can not install this application in a tablet. At optimization tips there is the following message: "Your APK needs to meet the following criteria: Any required hardware features are normally available on tablets."

This is my manifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="development.nk.anguide"
android:versionCode="2"
android:versionName="1.01" >

<supports-screens android:resizeable="true"
              android:smallScreens="true"
              android:normalScreens="true"
              android:largeScreens="true"
              android:xlargeScreens="true"
              android:anyDensity="true" />

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />

<permission
    android:name="development.nk.anguide.permission.MAPS_RECEIVE"
    android:protectionLevel="signature" />

<uses-feature 
    android:glEsVersion="0x00020000"
    android:required="false" />

<uses-permission android:name="development.nk.anguide.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<!--  ΝΟΜΙΖΩ ΔΕΝ ΧΡΕΙΑΖΟΝΤΑΙ ΤΑ 2 ΠΑΡΑΚΑΤΩ... -->
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />


<application
    android:allowBackup="true"
    android:icon="@drawable/icon_144_144"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="development.nk.anguide.xxxxxxxx"
        android:label="@string/app_name"
        android:screenOrientation="portrait" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name=".DetailForm"></activity>
    <activity android:name=".MapActivity"></activity>
    <activity android:name=".MapAllActivity"></activity>
    <activity android:name=".EditPreferences"></activity>
    <activity android:name=".Categories"></activity>
    <activity android:name=".SubCategory"></activity>
    <activity android:name=".CategoriesExpandableList"></activity>

    <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value=".......my API key .............." />
    </application>

The quite odd think is that i can install my app in my tablet through usb cable and run it normaly from eclipse...

So what should i change to be able for downloading from tablets?

Thank you in advance for reading my problem..

回答1:

I think the problem is here:

<!--  ΝΟΜΙΖΩ ΔΕΝ ΧΡΕΙΑΖΟΝΤΑΙ ΤΑ 2 ΠΑΡΑΚΑΤΩ... -->
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

Try this instead:

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

This question was already asked, see this post for more info. Also if you are targeting tablet and phones, you don't need to write this on your code, IMHO:

<supports-screens android:resizeable="true"
          android:smallScreens="true"
          android:normalScreens="true"
          android:largeScreens="true"
          android:xlargeScreens="true"
          android:anyDensity="true" />

I don't use this on my applications.



回答2:

You can install any app into any device (smartphone/ tablet) using USB cable from eclipse as long as you define correctly the application's target SDK to work with them.

Although the store won't recognize it unless you use some kind of "filters" do to that.

To resolve your issue add the android:requiresSmallestWidthDp to the supports-screens tag.

<supports-screens android:resizeable="true"
              android:smallScreens="true"
              android:normalScreens="true"
              android:largeScreens="true"
              android:xlargeScreens="true"
              android:anyDensity="true"
              android:requiresSmallestWidthDp="600" />

The 600 (dp units) means all devices must have, at least, 600dp minimum usable area of wide. This is the same as 7'' screens or higher. Or you could 720 (dp units) for minimum wide screen of 10'' screens.

Please, take a look here to get more details about android:requiresSmallestWithDp