Application listing for 10 inch tablets in playsto

2019-02-25 00:16发布

I have checked the uses-permission,uses-feature and support screens as suggested by other posts. I have uploaded an application in playstore as an update with the following manifest file. The previous version worked fine. The project was in eclipse earlier and is moved to android studio now.I encountered manifest merging as many libraries have been used and hence lot of permissions were added unnecessarily,hence I removed each individually. Checked the uses-permission and uses-feature too. The changes in manifest from previous version are indicated by stars

My application has to be supported only for tablets.

This is the main manifest file.

<?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        package="com.xx.yy"
        android:versionCode="13"
        android:versionName="1.8.1">

        <uses-sdk
            android:minSdkVersion="14"
            android:targetSdkVersion="19" />

        <supports-screens
            android:largeScreens="true"
            android:normalScreens="false"
            android:requiresSmallestWidthDp="600"
            android:smallScreens="false"
            android:xlargeScreens="true"
            *tools:replace="android:normalScreens,android:smallScreens" />

        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
        <uses-permission android:name="android.permission.CAMERA" />
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

        <uses-feature android:name="android.hardware.camera" />
        *<uses-feature
        *    android:name="android.hardware.location.gps"
        *    android:required="false" />

*<uses-feature
        *    android:name="android.hardware.location.network"
        *    android:required="false" />

        <uses-permission android:name="android.permission.GET_ACCOUNTS" />
        <uses-permission android:name="android.permission.WAKE_LOCK" />

        <permission
            android:name="com.xx.yy.permission.C2D_MESSAGE"
            android:protectionLevel="signature" />

        <uses-permission android:name="com.xx.yy.permission.C2D_MESSAGE" />
        <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
        <uses-permission android:name="android.permission.GET_TASKS" />
        <uses-permission android:name="android.permission.REORDER_TASKS" />
        *<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
     *   <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>*

        *<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" tools:node="remove"/>
       * <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" tools:node="remove"/>
       * <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" tools:node="remove"/>
      *  <uses-permission android:name="android.permission.VIBRATE"  tools:node="remove"/>
       * <uses-permission android:name="android.permission.FLASHLIGHT"  tools:node="remove"/>
      *  <uses-permission android:name="android.permission.READ_CONTACTS"  tools:node="remove"/>
    </manifest>

AAPT properties after running dump badging on the previous version.

package: name='om.xx.yyy' versionCode='8' versionName='1.7' platformBuildVersionName='5.0.1-1624448'
sdkVersion:'11'
targetSdkVersion:'19'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission: name='android.permission.CAMERA'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.GET_ACCOUNTS'
uses-permission: name='android.permission.WAKE_LOCK'
uses-permission: name='com.hp.wallartsolutions2.permission.C2D_MESSAGE'
uses-permission: name='com.google.android.c2dm.permission.RECEIVE'
uses-permission: name='android.permission.GET_TASKS'
uses-permission: name='android.permission.REORDER_TASKS'

application-icon-120:'res/drawable-mdpi-v4/icon.png'
application-icon-160:'res/drawable-mdpi-v4/icon.png'
application-icon-240:'res/drawable-hdpi-v4/icon.png'
application-icon-320:'res/drawable-xhdpi-v4/icon.png'
application-icon-480:'res/drawable-xxhdpi-v4/icon.png'
application: label='xyz' icon='res/drawable-mdpi-v4/hp_icon.png'
launchable-activity: name='com.xx.yyy.ui.SplashScreenActivity'  label='' icon=''
feature-group: label=''
  uses-feature: name='android.hardware.camera'
  uses-feature: name='android.hardware.screen.landscape'
  uses-implied-feature: name='android.hardware.screen.landscape' reason='one or more activities have specified a landscape orientation'
  uses-feature: name='android.hardware.touchscreen'
  uses-implied-feature: name='android.hardware.touchscreen' reason='default feature for all apps'
main
other-activities
other-receivers
other-services
supports-screens: 'large' 'xlarge'
supports-any-density: 'true'
requires-smallest-width:'600'
locales: '--_--' 'ca' 'da' 'fa' 'ja' 'nb' 'id' 'be' 'de' 'he' 'af' 'bg' 'th' 'zh' 'fi' 'hi' 'vi' 'sk' 'uk' 'el' 'nl' 'pl' 'sl' 'tl' 'am' 'in' 'ko' 'ro' 'ar' 'fr' 'hr' 'sr' 'tr' 'cs' 'es' 'ms' 'it' 'lt' 'pt' 'eu' 'hu' 'ru' 'zu' 'lv' 'sv' 'iw' 'sw' 'fr-CA' 'lo-LA' 'en-GB' 'et-EE' 'ka-GE' 'km-KH' 'zh-HK' 'hy-AM' 'zh-CN' 'en-IN' 'mn-MN' 'pt-BR' 'es-ES' 'es-US' 'pt-PT' 'zh-TW' 'ms-MY'
densities: '120' '160' '240' '320' '480'
native-code: 'armeabi' 'armeabi-v7a'

I tried running the aapt dump badging on the current version of the apk to find the apk properties. This is the result.

package: name='com.xx.yyy' versionCode='13' versionName='1.8.1' platformBuildVersionName='4.4W.2-1537038'
sdkVersion:'14'
targetSdkVersion:'19'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission: name='android.permission.CAMERA'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.GET_ACCOUNTS'
uses-permission: name='android.permission.WAKE_LOCK'
uses-permission: name='com.xx.yyy.permission.C2D_MESSAGE'
uses-permission: name='com.google.android.c2dm.permission.RECEIVE'
uses-permission: name='android.permission.GET_TASKS'
uses-permission: name='android.permission.REORDER_TASKS'
uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'
uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
application-label:'xyz'
application-icon-120:'res/drawable-mdpi-v4/icon.png'
application-icon-160:'res/drawable-mdpi-v4/icon.png'
application-icon-240:'res/drawable-hdpi-v4/icon.png'
application-icon-320:'res/drawable-xhdpi-v4/icon.png'
application-icon-480:'res/drawable-xxhdpi-v4/icon.png'
application: label='xyz' icon='res/drawable-mdpi-v4/icon.png'
launchable-activity: name='com.xx.yy.zz.SplashScreenActivity'  label='' icon=''
feature-group: label=''
  uses-feature: name='android.hardware.camera'
  uses-feature-not-required: name='android.hardware.camera.autofocus'
  uses-feature-not-required: name='android.hardware.camera.flash'
  uses-feature-not-required: name='android.hardware.camera.front'
  uses-feature-not-required: name='android.hardware.location.gps'
  uses-feature: name='android.hardware.screen.landscape'
  uses-feature: name='android.hardware.touchscreen'
  uses-feature-not-required: name='android.hardware.wifi'
  uses-feature: name='android.hardware.location'
  uses-implied-feature: name='android.hardware.location' reason='requested android.permission.ACCESS_COARSE_LOCATION permission, and requested android.permission.ACCESS_FINE_LOCATION permission'
  uses-feature: name='android.hardware.location.network'
  uses-implied-feature: name='android.hardware.location.network' reason='requested android.permission.ACCESS_COARSE_LOCATION permission'
main
other-activities
other-receivers
other-services
supports-screens: 'large' 'xlarge'
supports-any-density: 'true'
requires-smallest-width:'600'
locales: '--_--' 'ca' 'da' 'fa' 'ja' 'pa' 'ta' 'nb' 'id' 'be' 'de' 'he' 'te' 'af' 'bg' 'th' 'zh' 'fi' 'hi' 'vi' 'sk' 'uk' 'el' 'ml' 'nl' 'pl' 'sl' 'tl' 'am' 'bn' 'in' 'kn' 'ko' 'ro' 'ar' 'fr' 'hr' 'mr' 'sr' 'tr' 'cs' 'es' 'ms' 'it' 'lt' 'pt' 'eu' 'gu' 'hu' 'ru' 'zu' 'lv' 'sv' 'iw' 'sw' 'fr-CA' 'lo-LA' 'en-GB' 'et-EE' 'ka-GE' 'km-KH' 'zh-HK' 'hy-AM' 'zh-CN' 'en-IN' 'mn-MN' 'pt-BR' 'es-ES' 'es-US' 'pt-PT' 'zh-TW' 'ms-MY'
densities: '120' '160' '240' '320' '480'
native-code: 'armeabi' 'armeabi-v7a'

Is there something I am missing so that the application is visible for 7 inch devices too? My application has to be supported only for tablets. The application is not listed for any 7 inch devices. The aapt dump badging command displays support for large and x-large devices.

Manifest merging happens due to zing library following are the permissions in the library

<manifest
    package="com.google.zxing.client.android"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:installLocation="auto"
    android:versionCode="94"
    android:versionName="4.5.1">

    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="android.permission.FLASHLIGHT"/>
    <uses-permission android:name="android.permission.READ_CONTACTS"/>
    <uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="19"/>

    <!-- Don't require camera, as this requires a rear camera. This allows it to work on the Nexus 7 -->
    <uses-feature
        android:name="android.hardware.camera"
        android:required="false"/>
    <uses-feature
        android:name="android.hardware.camera.front"
        android:required="false"/>
    <!-- TODO replace above two with next line after Android 4.2 -->
    <!-- <uses-feature android:name="android.hardware.camera.any"/> -->
    <uses-feature
        android:name="android.hardware.camera.autofocus"
        android:required="false"/>
    <uses-feature
        android:name="android.hardware.camera.flash"
        android:required="false"/>
    <uses-feature android:name="android.hardware.screen.landscape"/>
    <uses-feature
        android:name="android.hardware.wifi"
        android:required="false"/>
    <!-- This excludes Google TV, which is unfortunately included by virtue of not requiring a camera -->
    <uses-feature android:name="android.hardware.touchscreen"/>
    <!-- TODO make this not required again after android.hardware.camera.any is available -->

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

</manifest>

UPDATE 1: I changed the uses feature android.hardware.location.gps to false and it doesn't appear in the playstore search directly. But when searched from browser and pressing on install navigates to playstore and installs successfully. I am using a HP Slate 7 to install http://www.gsmarena.com/hp_slate_7-5317.php

UPDATE 2: I have changed the uses feature android.hardware.location.network to false and uploaded a beta build. Waiting for it to be active for now

3条回答
2楼-- · 2019-02-25 00:53

It is not matter of permission but <support-screens> block which causes this.

    <supports-screens
        android:largeScreens="true"
        android:normalScreens="false"
        android:requiresSmallestWidthDp="600"
        android:smallScreens="false"
        android:xlargeScreens="true"
        tools:replace="android:normalScreens,android:smallScreens" />

Yours limit your app to certain screens, so I suggest you review it, especially entries set to false.

EDIT

tools:replace tells that you want to use values from your manifest, not from libs'. And yours tells normalScreen=false. And normalScreen is Traditionally this is an HVGA medium density screen, but WQVGA low density and WVGA high density are also considered to be normal. I suspect 7" tablets you see the problem with are not hi-res screen powered, and if so that's why your app is listed as not compatible with. Unless your app is really not working on normalScreen there's no point of setting this to false.

查看更多
女痞
3楼-- · 2019-02-25 00:55

Solved by adding.

*<uses-feature
            android:name="android.hardware.location"
            android:required="false" />*
 <uses-feature
            android:name="android.hardware.location.gps"
            android:required="false" />

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

The HP slate 7 did not have the location support. The location block in italic is required to make the application visible in HP slate 7

查看更多
Luminary・发光体
4楼-- · 2019-02-25 01:02

I faced same thing while uploading. It

When I removed all the uses-feature block it started listing all mobiles and tablets. This is the manifest I have -

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.COMPANY.APP.app">

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

    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="com.COMPANY.APP.app.permission.MAPS_RECEIVE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

    <permission
        android:name="com.COMPANY.APP.app.gcm.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <uses-permission android:name="com.COMPANY.APP.app.gcm.permission.C2D_MESSAGE" />
    <uses-permission
        android:name="android.permission.FLASHLIGHT"
        android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
        android:protectionLevel="normal" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
</manifest>
查看更多
登录 后发表回答