4

This is my configuration of Manifest.xml, I don't understand why Nexus 7 and other tablet can't be able to download this app from market.

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

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" android:required="false"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" android:required="false"/>
<uses-permission android:name="android.permission.CAMERA" android:required="false"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:required="false" />
<uses-permission android:name="android.permission.CALL_PHONE" android:required="false" /> 
<uses-feature android:name="android.hardware.camera" android:required="false"/> 
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>

In the Developer Console there is this string Layout schermo: SMALL NORMAL LARGE XLARGE so I believe that the problem is the permission. Any Suggestions?

All the Manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="**********"
android:versionCode="3"
android:versionName="1.4" >

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

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" android:required="false"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" android:required="false"/>
<uses-permission android:name="android.permission.CAMERA" android:required="false"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:required="false" />
<uses-permission android:name="android.permission.CALL_PHONE" android:required="false" /> 
<uses-feature android:name="android.hardware.camera" android:required="false"/> 
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>




<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <activity
        android:name=".SplashScreenActivity"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="**************"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="InfoServizio"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="NewProfilo"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="MiaDietaActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="Percentuali"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="DatiFisiciUtente"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="ListViewFoodCategoryActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="ListViewFoodActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="FoodDescriptionActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity android:name="MiaDietaActivityWebView" >
    </activity>
    <activity
        android:name="AggiungiNuovoPiattoActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="EmailActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="ProfiloActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="InsertInitialDataActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="LoginActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name=".StoricoTabActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="PesoRiepilogoActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="GraficoRiepilogoActivity"
        android:screenOrientation="landscape"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="StoricoPesoActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="StoricoPietanzeActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="AggiungiNuovoPiattoSecondoPassaggioActvity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="ActivityScattaFoto"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="ListViewMyFoodActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="ListViewMyFoodCategoryActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="SearchActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="HomeActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="GraficoOK"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="FormuleActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="CreditsActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="AssociaDietologoActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity android:name="org.achartengine.chartdemo.demo.chart.XYChartBuilder" />
    <activity android:name="org.achartengine.chartdemo.demo.chart.PieChartBuilder" />
    <activity android:name="org.achartengine.GraphicalActivity" />
    <activity android:name=".GeneratedChartDemo" />
    <activity
        android:name="AttesaDietologoActivity"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="FacebookLikeActivity"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="TwitterGoActivity"
        android:screenOrientation="portrait" >
    </activity>
    <activity
        android:name="CalendarView"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.Transparent" >
    </activity>
</application>

</manifest>
PearsonArtPhoto
  • 38,970
  • 17
  • 111
  • 142
Paolo
  • 555
  • 4
  • 28
  • I don't see any problems with that part of the Manifest. Could you post the rest of the manifest? – Grimmace Dec 10 '12 at 21:20
  • Now there is all the Manifest.. I have put ****** in the name of app... I don't wont advertising :D – Paolo Dec 10 '12 at 21:43

2 Answers2

5

You can't use android:required="false" with permissions; it is only for uses-feature. Some permissions imply features. In this case android.permission.CALL_PHONE implies android.hardware.telephony. The Nexus 7 doesn't have this and will be filter out. Try this:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CALL_PHONE" />

<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.telephony" android:required="false"/>
Grimmace
  • 4,021
  • 1
  • 31
  • 25
  • Then won't I get an error for when I try to use the telephone manager for the tablet? Is there something I can do? For example: `if(Works with telephone){//Do stuff} else{ //ignore}?` – Ruchir Baronia Dec 09 '15 at 05:04
  • +Ruchir Baronia - Not any straightforward way to know. Most API's just return null if it doesn't exist on that device. For telephony specifically I'd try this idea: http://stackoverflow.com/a/5196919/146628 – Grimmace Dec 10 '15 at 05:14
1

The Nexus 7 doesn't have autofocus. So if it shows in your <uses> tag, the app will be hidden from all devices which don't have that feature. If your app doesn't require autofocus, but just the camera, then remove that <uses> tag, and you should be good to go on all devices which have a camera. You might also want to change the <uses> tag for the camera to camera.any, as otherwise it will fail, due to lack of a back-facing camera.

323go
  • 14,143
  • 6
  • 33
  • 41
  • This is normally true, but he specifically uses android:required="false". Also, the "android.hardware.camera" would fail without the android:required="false" since that feature implies a back facing camera and the Nexus 7 only has a front facing. – Grimmace Dec 10 '12 at 21:26
  • @Grimmace, you're right on the camera vs. camera.any -- I was just updating that as your comment came through. – 323go Dec 10 '12 at 21:28
  • But when I study Android Documentation, I have understand that if I write this " android:required="false" " Market don't filters the application.. or I'm wrong? – Paolo Dec 10 '12 at 21:36