3

I have developed and tested my app on a Samsung Galaxy Tab4 10.1, and it has worked perfectly fine. It is now ready to publish to the Google play store, however when I do and find it in the app store on my Galaxy Tab4 it says that the app is not compatible with my device.

I have had a look at previous questions on here and at the documentation provided by android and Google but all the solutions I have tried haven't worked. Below is my AndroidManifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" android:versionCode="#" android:versionName="#" package="#">
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="20"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<application android:theme="@android:style/Theme.Holo.Light" android:label="#" android:icon="@drawable/launcher_icon" />
<supports-screens android:largeScreens="true" android:xlargeScreens="true" android:normalScreens="false" android:smallScreens="false" />

Where there is a '#' above I have the correct details, I just did this to protect the client's confidentiality. Does anyone know of any other permissions etc that I need to set? With this manifest it list the TabS and Tab4 Active as supported devices but not the Galaxy Tab4 10.1, which is the main tablet we use for development.

Thanks in advance.

Mike
  • 329
  • 1
  • 2
  • 12
  • Your Tablet had autofocus? – Alessandro Verona Feb 13 '15 at 13:32
  • Apparently not. I have just removed this and it is now showing the Tab4 10.1 has a supported device. Althought, I would have thought that the Tab4, being one of Samsung's newer tablets would have autofocus. Anyway, thanks very much. You've averted a major headache for me :) – Mike Feb 13 '15 at 13:42

4 Answers4

3

To make sure your apk is compatible with any tablet as described in the official Tablet App Quality guide:

In your app manifest, locate any <uses-feature> elements. In particular, look for hardware features that might not be available on some tablets, such as:

  • android.hardware.telephony
  • android.hardware.camera (refers to back camera), or
  • android.hardware.camera.front

So, you have to replace these 2 lines:

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

by this one:

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

& of course handle the case when the Camera feature doesn't exist in the device by this check:

if (Camera.getNumberOfCameras() > 0){
    // device has camera, it is safe to use it here
}
Community
  • 1
  • 1
AbdelHady
  • 9,334
  • 8
  • 56
  • 83
2

The problem was that my device doesn't have autofocus so as soon as I removed that line, the problem was solved.

Mike
  • 329
  • 1
  • 2
  • 12
0
// If you use camera and phone/Call functionality than include a following uses 
      feature. In my case Phone/Call are uses, and check when you upload a apk on
      goolge play store. How many number of device are supported. 

<uses-feature
    android:name="android.hardware.telephony"
    android:required="false" />
<uses-feature
    android:name="android.hardware.camera"
    android:required="false" />
<uses-feature
    android:name="android.hardware.camera.autofocus"
    android:required="false" />
<uses-feature
    android:name="android.hardware.location.gps"
    android:required="false" />
<uses-feature
    android:name="android.hardware.location"
    android:required="false" />
<uses-feature
    android:name="android.hardware.location.network"
    android:required="false" />
<uses-feature
    android:name="android.hardware.telephony.cdma"
    android:required="false" />
<uses-feature
    android:name="android.hardware.telephony.gsm"
    android:required="false" /> 
Adam
  • 51
  • 4
  • Seems good, but is correct ? ... I think that no, but you save my day I give +1 –  Jan 27 '16 at 15:27
0

or you can put required="false" in the auto focus. then check the package compatiblity in your code getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_AUTOFOCUS)

hepizoj
  • 243
  • 4
  • 9