Reputation: 81
I have published an app in google play and for some devices is is showing as not supported such as Nexus 5 , Galaxy S5 to name a few .
I have mentioned in my AndroidManifest.xml the filters for only small and normal size screens as suggested in the below link
http://developer.android.com/guide/practices/screens-distribution.html#FilteringHandsetApps
<!-- all small size 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" />
<!-- all normal size screens -->
<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>
Can somebody suggest what more needs to be added to get the devices in the supported list , I am suspecting these devices are of higher density.
Upvotes: 1
Views: 2131
Reputation: 1751
I just had a similar problem. I wanted to publish an app to be downloaded only on smartphones. I will introduce tablet support later. So I needed a filter that makes my app available only for smartphones. The app could not be install on Nexus 5 or Galaxy S5.
To fix this I did as suggested in the dev documentation (screen distribution) (see also answer on stackoverflow):
<manifest ... >
<compatible-screens>
<!-- all small size screens -->
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="small" android:screenDensity="mdpi" />
<screen android:screenSize="small" android:screenDensity="hdpi" />
<screen android:screenSize="small" android:screenDensity="xhdpi" />
<!-- all normal size screens -->
<screen android:screenSize="normal" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />
</compatible-screens>
...
<application ... >
...
<application>
</manifest>
But that’s not enough. Some xxhdpi devices will not be supported. You may be tempted to copy/paste the last line and add “xxhdpi”, but tt won’t work (I just tested it and the APK signing failed with this error: "error APT0000: String types not allowed (at 'screenDensity' with value 'xxhdpi')") ;)
To support xxhdpi check the dev documentation (compatible screens element).
Note: This attribute currently does not accept xxhdpi as a valid value, but you can instead specify 480 as the value, which is the approximate threshold for xhdpi screens.
Thus you need to add 480, not xxhdpi, as follows:
<screen android:screenSize="small" android:screenDensity="480" />
<screen android:screenSize="normal" android:screenDensity="480" />
Now, coming back to the Nexus 5 and Galaxy S5 not being supported. Let’s check some specifications:
LG Nexus 5: http://www.gsmarena.com/lg_nexus_5-5705.php
Samsung Galaxy S5: http://www.gsmarena.com/samsung_galaxy_s5-6033.php
So according to the dev documentation (screen support):
Figure 1. Illustration of how Android roughly maps actual sizes and densities to generalized sizes and densities (figures are not exact).
As you can see in the illustration above, between 4 and 5 inches is a bit “tricky” (please comment if I'm wrong) as the screen can be “normal” or “large”. So basically to be on the safe side I had to add support for large:
<screen android:screenSize="large" android:screenDensity="ldpi" />
<screen android:screenSize="large" android:screenDensity="mdpi" />
<screen android:screenSize="large" android:screenDensity="hdpi" />
<screen android:screenSize="large" android:screenDensity="xhdpi" />
<screen android:screenSize="large" android:screenDensity="480" />
I just tested on the Play Store and my colleague owning a Nexus 5 was able to download the app. Like this, anyway, some small tablets or phablets (screen size between 4 and 7 inches) will still be able to download my app, but at least the newest tablets with xlarge screen (larger than 7 inches) won’t. In my case this is acceptable… hope this helps and…
…please comment if I’m wrong about the zone between 4 and 5 inches which is not really clear to me. Which is normal or large…
Upvotes: 1
Reputation: 276
Try to include <supports-screens>
element to your manifest, as <compatible-screens>
defines specific screens your app supports, but <supports-screens>
defines lower threshold of screens your app supports (that is, larger screens are supported too).
Upvotes: 0