3

I have published an app on Google Play Store but when I try to download it on Tablet, it says, app is not compatible.

Also, in developer console, I get this message: Your layout should make use of the available space on 7-inch tablets

Now, 1st thing , I want to lock app to only portrait orientation and hence screen usage will be almost same.

Here's the link of the app.

Some imp info about the app:

  • android:minSdkVersion="10"
  • android:largeScreens="true" AND android:xlargeScreens="true"

To support Tablets, android docs says, check if minSdkVersion is declared with value 11 or higher. , but what if I want to support devices with OS 2.3.3 ?

Please give appropriate advice.

Edit

Is this ok?

  <uses-permission android:name="android.permission.CAMERA" android:required="false"/>
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.SEND_SMS" android:required="false"/>
  <uses-permission android:name="android.permission.READ_CONTACTS"  android:required="false"/>
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Edit 2

After updating permissions part of manifest file as following, app is showing up in tabs also:

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

<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-feature android:name="android.hardware.screen.portrait" android:required="false" />
GAMA
  • 5,958
  • 14
  • 79
  • 126
  • forget about the misSdkVersion because i have an app in the market which support 2.2 and it support tablets as well. do u have layout-xlarge or layout-sw720dp in your res folder? – Coderji Nov 11 '13 at 11:50
  • **layout-large** is there but no **layout-xlarge**. Also **layout-large** don't have layout for all screens of app – GAMA Nov 11 '13 at 11:53
  • check with sdkversions maximum & target sdks used in AndroidManifest.xml file – Anil kumar Nov 11 '13 at 11:58
  • @OsamaEspil & AnilKumar - values of both **minSdkVersion** and **targetSdkVersion** for my app are **10**. Will that do? – GAMA Nov 11 '13 at 13:32
  • @GAMA The link to your app is down. Did you remove it or Google suspended it? – fedmich Mar 28 '15 at 23:49

1 Answers1

4

it says, app is not compatible.

It is showing error on device not only because minSDKversion but also google play concern about your given permission on the manifest file as well.

Like if you entered something like:

<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

Your tab will not support it.

So instead of using uses-permission use <uses-feature>. And in java file check for it that your needed hardware is available or not.

For <uses-feature> see the below link:

http://developer.android.com/guide/topics/manifest/uses-feature-element.html#features-reference

Edited:

<uses-permission android:name="android.permission.CAMERA" android:required="false"/>
  <uses-permission android:name="android.permission.SEND_SMS" android:required="false"/>
  <uses-permission android:name="android.permission.READ_CONTACTS"  android:required="false"/>

Nope you can't give permission like this because uses-permission not allowed android:required="false". Although It will not through any error it will not work.

If you will use <uses-feature> it will take the permission to access the specific hardware.

So use this:

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

And not to forget to check this feature availability in your java code. If you will not check it, CAMERA, SEND_SMS wont work in your app.

To check camera availability use this:

import android.content.pm.PackageManager;

PackageManager pm = context.getPackageManager();

if (pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)) {
   // Do you camera work here.
} 
Avijit
  • 3,834
  • 4
  • 33
  • 45
  • Or that implies, I can **REPLACE** `` with `` and so on OR I'll need **BOTH** ? – GAMA Nov 11 '13 at 12:23
  • No just keep one i.e. – Avijit Nov 11 '13 at 12:26
  • No, if I remove *and just keep* , I get exception: **unable to connect to camera service**. If I keep both, it's working... – GAMA Nov 11 '13 at 12:37
  • Check my answer i have mentioned "not to forget to check this feature availability in your java code. If you will not check it, CAMERA, SEND_SMS wont work in your app." – Avijit Nov 11 '13 at 12:39
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/40957/discussion-between-andru-and-gama) – Avijit Nov 11 '13 at 12:43
  • What exactly do you mean by checking. I do check like this `if (getApplicationContext().getPackageManager() .hasSystemFeature(PackageManager.FEATURE_TELEPHONY))`. But if I don't add permission tag and just add features tag, it doesn't work **even though device have SMS support**. So, I geuss both are required,refer this : http://developer.android.com/guide/topics/manifest/uses-feature-element.html – GAMA Nov 11 '13 at 12:45
  • Yap sorry for confusion. You have to declare the both. – Avijit Nov 11 '13 at 13:09
  • Ok, thanks a lot. I have made the changes and uploaded new version on Play Store. I'll let you know if it works as uploading might take few minutes/hours. – GAMA Nov 11 '13 at 13:15
  • Yap. Hope that will help you. – Avijit Nov 11 '13 at 13:17
  • Ok. Also,values of both **minSdkVersion** and **targetSdkVersion** for my app are **10**. Will that do? – GAMA Nov 11 '13 at 13:32
  • Make android:minSdkVersion="8" if your other java code dont need the upper version. – Avijit Nov 11 '13 at 13:34
  • I'm more concerned about **targetSdkVersion**. As android documentation says, for tablet compatibility check *minSdkVersion is declared with value 11 or higher* ? – GAMA Nov 11 '13 at 13:41