Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<compatible-screens> excludes app from Nexus 5x in Google Play

The app I am developing now is not visible in Google Play from Nexus 5x. As it does not support tablets, there is a <compatible-screens> section in the manifest (as suggested in documentation):

 <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" />
   <!-- XXHdpi Screen -->
    <screen android:screenSize="normal" android:screenDensity="480" />
    <!-- XXXHdpi Screen -->
    <screen android:screenSize="normal" android:screenDensity="560" />
    <screen android:screenSize="normal" android:screenDensity="640" />
</compatible-screens>

But I can't use <supports-screens> because of this (I need to completely filter out the app from tablets):

Caution: If you use the <supports-screens> element for the reverse scenario (when your application is not compatible with larger screens) and set the larger screen size attributes to "false", then external services such as Google Play do not apply filtering. Your application will still be available to larger screens, but when it runs, it will not resize to fit the screen. Instead, the system will emulate a handset screen size (about 320dp x 480dp; see Screen Compatibility Mode for more information). If you want to prevent your application from being downloaded on larger screens, use <compatible-screens>, as discussed in the previous section about Declaring an App is Only for Handsets.

Are there any other ways to solve this problem except adding line with 420 density to <compatible-screens>?

like image 428
Margarita Litkevych Avatar asked Jan 26 '16 08:01

Margarita Litkevych


1 Answers

According to Google the Nexus 5X has a xxhdpi screen but with a density of 2,6. So 2,6 * 160 (mdpi) = 416, but according to Android developers' site the accepted value is 420. So just add <screen android:screenSize="normal" android:screenDensity="420" />

UPDATE: The new 5" Google Pixel has the same density so the same rule applies for it as well.

like image 127
Aleks Nine Avatar answered Sep 24 '22 21:09

Aleks Nine