Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
218 views
in Technique[技术] by (71.8m points)

android - App is published on Play Store but doesn't show up on Tablets

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" />
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.
} 

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...