androidandroid-manifesthdpi

How to target xxxhdpi devices in Android manifest file?


According to Google documentation (http://developer.android.com/guide/topics/manifest/compatible-screens-element.html#compatible-screens) I am using the <compatibile screen> tag to target specific screens for my app (I'm trying to target phones only). This is my 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" />

    <screen android:screenSize="normal" android:screenDensity="420" />
    <screen android:screenSize="normal" android:screenDensity="480" />
    <screen android:screenSize="normal" android:screenDensity="560" />

</compatible-screens>

Doing so however, some devices are listed as not compatible in the Google Play Store, for instance the Samsung Galaxy S6, the nexus 5x and the nexus 6P. It seems that all devices with a very high dpi are not included (xxxdpi). How do I include those phones?


Solution

  • use can define in manifest file in this manner

    <supports-screens android:resizeable=["true"| "false"]
                      android:smallScreens=["true" | "false"]
                      android:normalScreens=["true" | "false"]
                      android:largeScreens=["true" | "false"]
                      android:xlargeScreens=["true" | "false"]
                      android:anyDensity=["true" | "false"]
                      android:requiresSmallestWidthDp="integer"
                      android:compatibleWidthLimitDp="integer"
                      android:largestWidthLimitDp="integer"/>
    

    and for more detail please follow this link http://developer.android.com/guide/topics/manifest/supports-screens-element.html