Sunday, November 6, 2011

android manifest permissions filter in the market

I had a hard time making Geopaparazzi appear in the market for my Asus Transformer. I first thought it was a screen size/density problem, but then I had any permission

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

so I tried to play on sdk versions, btu had the same results:

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

and I read a dozend times through the docs and finally noted the necessary part:

In general, if an application requests hardware-related permissions, Android Market assumes that the application requires the underlying hardware features, even though there might be no corresponding to declarations. Android Market then sets up filtering based on the features implied by the declarations.

Well, as obvious as it sounds, my Asus has no telephony soppurt, and therefore it was not listed because that permission was asked.

Android 2.0 (API 5) brings the possibility to declare optional features:

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

That does the trick.

I hope that saves some headache to someone else.
Post a Comment