9

My app is in BETA TESTING. It's compatible with iBall tablet (tablet has sim card capability) and with Nexus5 running Marshmallow, but isn't compatible with Nexus7 running Marshmallow (and also with Nexus10. I didn't check it yet). I am not sure which permission is causing this. Or is it because of targetSdkVersion? (I dont think targetSdkVersion causes this. Please correct me if I am wrong)

Manifest:

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <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_FINE_LOCATION" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

    <uses-feature android:name="android.permission.RECEIVE_SMS" android:required="false" />
    <uses-feature android:name="android.permission.READ_SMS" android:required="false" />
    <uses-feature android:name="android.permission.READ_PHONE_STATE" android:required="false" />

    <permission
        android:name="in.company.company.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <uses-permission android:name="in.company.company.permission.C2D_MESSAGE" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />

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

build.gradle:

    compileSdkVersion 23
    buildToolsVersion '23.0.1'

    defaultConfig {
        applicationId "in.company.company"
        minSdkVersion 16
        targetSdkVersion 21
        versionCode 8
        versionName "1.7"
        multiDexEnabled true
    }

Also, I didn't upload any Tablet screenshots on developer console. For now, the app is designed for phone, but I want to make it available for all android devices out there. What I need to look into?

Thanks in advance.

Hemanth
  • 2,717
  • 2
  • 21
  • 29
  • Your compile SDK version and target SDK version are different. Can you make it same and try? – Jayakrishnan Salim Dec 21 '15 at 04:31
  • @JayakrishnanSalim : App is compatible with Nexus5 running Marshmallow. – Hemanth Dec 21 '15 at 05:47
  • Could you try to remove the supports-screen section? If you allow every device it is not necessary. – Christopher Dec 22 '15 at 07:07
  • @Christopher : Didn't help. – Hemanth Dec 22 '15 at 20:46
  • Do you have native code parts? Or libs that are using native components? Do you have any dependency that will add some more sections to your Manifest during build? Could you remove the sections from your manifest? Maybe the required-tag will be ignored? – Christopher Dec 23 '15 at 06:47
  • @Christopher : I do have dependency that adds more permissions, but they are normal permissions like `INTERNET` and `ACCESS_NETWORK_STATE`. – Hemanth Dec 24 '15 at 05:20

2 Answers2

4

just add this requiresSmallestWidthDp in supports-screens element.

For example, a typical handset screen has a smallestWidth of 320dp, a 7" tablet has a smallestWidth of 600dp, and a 10" tablet has a smallestWidth of 720dp. These values are generally the smallestWidth because they are the shortest dimension of the screen's available space.

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

read more about support-screen

one more thing if you are compile your code with API 23 then why use targetSdkVersion 21 change it to 23.(don't forgot to implement permission model for your app when target 23 API)

Notes: if you are going to make app available for all android devices then you must have to use this supports-screens elements else Google play show you "app is not compatible with this device" or similar message. check some old answer which is related to tablets screen

Community
  • 1
  • 1
Dhaval Parmar
  • 18,812
  • 8
  • 82
  • 177
  • If I don't use `requiresSmallestWidthDp`, by default it should be available for all devices.. right? Also, I am not planning to implement Marshmallow permissions system in my app right now, that's why I am using `targetSdkVersion` as `21`. I don't think it's responsible for this issue, as the app is compatible with Nexus5 running Marshmallow. – Hemanth Dec 24 '15 at 05:17
  • no, when upload app on google play supports-screens perameters are required to compatible device. if you are not going to use supports-screens element some of nexus device not support your app. Google play show you "app is not compatible with this device" – Dhaval Parmar Dec 24 '15 at 07:52
4

May be your Tablet doesn't support some features like phone. That's why its conflicting with permissions. Its done like

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

Other possible features are :

android.hardware.camera

android.hardware.camera.autofocus

android.hardware.location.gps

android.hardware.location

android.hardware.location.network

You can check all the Features Required in your application.

Anuj Sharma
  • 4,294
  • 2
  • 37
  • 53
  • I see this was downvoted, but I do think this is the issue. I have an app that includes SMS and had to use this exact tag to work on non-phone devices. – spartygw Dec 28 '15 at 18:44