16

I have an app I released to a private Google Play beta. I can install this exact same APK to my Nexus 7 just fine with

adb pm install

but through the Google Play store it is marked for this exact same Nexus7 as

Your device isn't compatible with this version.

This is the same apk. I can't figure out how to get any information on why the play store thinks it's not compatible.

My manifest looks like this:

<uses-sdk android:minSdkVersion="10" />

<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.CAMERA"></uses-permission>
<uses-permission android:name="android.permission.RECORD_AUDIO"></uses-permission>
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
<uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_TASKS" />

<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />

<application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".foobar"
              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>

    <service android:name=".fooservice" android:exported="false" android:enabled="true" android:label="@string/app_name" android:icon="@drawable/icon">
    </service>

</application>

Any help on determining why Google Play thinks it is not compatible?

spartygw
  • 3,289
  • 2
  • 27
  • 51

4 Answers4

9

That's completely correct this behavior: please refer to the official documentation here http://developer.android.com/guide/topics/manifest/uses-feature-element.html.

That's the relevant part:

Declared <uses-feature> elements are informational only, meaning that the Android system itself does not check for matching feature support on the device before installing an application. However, other services (such as Google Play) or applications may check your application's <uses-feature> declarations as part of handling or interacting with your application. For this reason, it's very important that you declare all of the features (from the list below) that your application uses.

So the fact you're able to install the apk through adb is not a proof for a particular device to be filtered off or not.

Also, check here: http://developer.android.com/guide/topics/manifest/uses-permission-element.html

In some cases, the permissions that you request through can affect how your application is filtered by Google Play.

If you request a hardware-related permission — CAMERA, for example — Google Play assumes that your application requires the underlying hardware feature and filters the application from devices that do not offer it.

Update: you've confirmed you're using the Nexus 7 2012, so please refer to this official blog post: http://android-developers.blogspot.ch/2012/07/getting-your-app-ready-for-jelly-bean.html.

Google states "apps requiring the android.hardware.camera feature will not be available on Nexus 7".

If you need that permission because you use the camera in your app, you can do it programmatically as explained in http://developer.android.com/guide/topics/media/camera.html#detect-camera.

fasteque
  • 4,309
  • 8
  • 38
  • 50
  • 1
    Okay, that does help clear up the issue of adb working and not the play store. Is there any way for me to determine why the play store thinks `` isn't compatible with a nexus 7? – spartygw Jan 31 '14 at 16:11
  • Reading your permissions list, the READ_PHONE_STATE there might be causing Google Play to filter your Nexus 7 out. Any chance to test the apk without that permission (maybe as beta apk in the dev console)? – fasteque Jan 31 '14 at 16:12
  • Aha! Great catch. I will try that out and report back. Unfortunately it can take sometimes hours before my uploaded APK filters through the Play store. – spartygw Jan 31 '14 at 16:15
  • Ok, give it a try. It's something related to the permissions you're asking or the feature you need. – fasteque Jan 31 '14 at 16:16
  • I've just edited my answer because searching for similar problems, it looks like if you request the camera in the manifest the Nexus 7 2012 will be not available in the supported device list. – fasteque Jan 31 '14 at 16:24
  • 1
    add the required=false tag like `` than you will need to handle the case of not having a camera in code. see the link that @fasteque posted – Or Bar Jan 31 '14 at 16:26
  • Thank you, gentlemen. I am fairly certain you have solved it for me. I will accept the answer just as soon as I can verify through the play store. – spartygw Jan 31 '14 at 16:40
  • @spartygw I have mentioned in the manifest and same error i am getting "Your device isn't compatible with this version” from play store with the moto e device which is not having front camera. What could be the problem – AndroidDev Jul 17 '14 at 07:47
5

This happened to my app a couple of times. It turned out the camera requirement was causing this error when the device user had never used the camera since purchase.

I change the camera requirement to not be required by the following:

<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
Gravitoid
  • 1,294
  • 1
  • 20
  • 20
  • I have mentioned in the manifest and same error i am getting "Your device isn't compatible with this version” from play store with the moto e device which is not having front camera. What could be the problem – AndroidDev Jul 17 '14 at 07:48
  • You may also need the lines to let the play store not require the feature. My experience was that if they user hadn't used the camera on their phone then somehow it wasn't recognizing the feature existed and the "required" default was true. I don't remember what phone version my user had but using all the above lines seems to have fixed it. – Gravitoid Jul 17 '14 at 15:14
0

You should read/follow this link from Reto Meier.

As said in the link from now on you need to specify your app features.

Basically a quick solution is to run aapt dump badging {your apk} and verify which features your app is using. Then add the ones that do not affect your app usability to your manifest with required field set to false. e.g. <uses-feature android:name="android.hardware.camera" android:required="false" />

That should be enough.

Community
  • 1
  • 1
manuelvsc
  • 525
  • 7
  • 11
0

This Can be Happen when you give unnecessary permissions.

in my case, i use the permission

uses-feature android:name="com.sec.feature.spen_usp" android:required="true"

When i remove this permission then it works Fine

Areeba Qurashi
  • 119
  • 1
  • 8