9

I currently have a problem with Google Play filtering and the new density class xxhpdi, which was introduced in API Level 16. My app is splitted into 3 APK files (I know that is not the best practice, but due to a bad planning, I have to do it like this at the moment). The interesting part is the version for Android 4.0, Smartphones only. I have setup market filter in AndroidManifest.xml like this:

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17"/>
<compatible-screens>
    <screen android:screenDensity="ldpi" android:screenSize="small"/>
    <screen android:screenDensity="mdpi" android:screenSize="small"/>
    <screen android:screenDensity="hdpi" android:screenSize="small"/>
    <screen android:screenDensity="xhdpi" android:screenSize="small"/>

    <screen android:screenDensity="ldpi" android:screenSize="normal"/>
    <screen android:screenDensity="mdpi" android:screenSize="normal"/>
    <screen android:screenDensity="hdpi" android:screenSize="normal"/>
    <screen android:screenDensity="xhdpi" android:screenSize="normal"/>
</compatible-screens>

The problem is now, that new devices with 1080p screens like the HTC Droid DNA can't see or install my app, because I did not specify that it also supports the xxhdpi screens. The problem is, because i set my minSdkVersion to API Level 14, which is Android ICS, I cannot simply add the line:

<screen android:screenDensity="xxhdpi" android:screenSize="normal"/>

This is because API level 14 does not know the xxhdpi class. Is there any solution for my problem, without having to create a 4th seperate APK file?

Thank you.

t0mm13b
  • 34,087
  • 8
  • 78
  • 110
NiThDi
  • 1,007
  • 1
  • 9
  • 22
  • To quote *Caution: Normally, you should not use this manifest element. Using this element can dramatically reduce the potential user base for your application, by not allowing users to install your application if they have a device with a screen configuration that you have not listed. You should use it only as a last resort* from [Developer's SDK](http://developer.android.com/guide/topics/manifest/compatible-screens-element.html) – t0mm13b Jan 23 '13 at 19:30
  • xxhdpi is only in JB upwards AFAICT, in short, you're out of luck unfortunately. The easiest I would think is to rebuild targetting JB, aka API 20 or 21, then it should do it. – t0mm13b Jan 23 '13 at 19:34
  • Helle, thanks for the answer. The app is already targeting JB MR1, as this is API level 17. API level 14 is Android 4.0. – NiThDi Jan 24 '13 at 09:33

2 Answers2

24

I found the solution: Instead of adding the

<screen android:screenDensity="xxhdpi" android:screenSize="normal"/>

line to the compatible-screens section, it seems like the numeric value is working as well:

<screen android:screenDensity="480" android:screenSize="normal"/>
NiThDi
  • 1,007
  • 1
  • 9
  • 22
  • Yes, that's the same thing with tvdpi and 213 (which is relevant for the Nexus 7) and it has nothing to do with the API you are targeting, these constants are missing at all. You should accept your answer. – brillenheini Mar 18 '13 at 13:40
  • I have tried putting the value of 480 in instead of xxhdpi, and whilst the app complies properly, when it hits the store, it's not being shown as compatible with the Galaxy S4. Despite having the latest updates from Android, I'm still unable to compile - I get the errors as outlined above. – djbp Jul 01 '13 at 20:31
1

There seems to be an open issue regarding this problem: code.google.com/p/android It sucks but I can't think of a better workaround.

Romina Liuzzi
  • 741
  • 8
  • 13