سؤال

I have a problem with Google Play filtering. I want hide my app for devices, which has lowest resolution then 800x480px. How can I setup this?

I try:

<supports-screens 
    android:largeScreens="true" 
    android:anyDensity="true" 
    android:normalScreens="false" 
    android:smallScreens="false"
    android:xlargeScreens="true"
    android:requiresSmallestWidthDp="480" />

and:

<supports-screens 
        android:largeScreens="true" 
        android:anyDensity="true" 
        android:normalScreens="true" 
        android:smallScreens="false"
        android:xlargeScreens="true"
        android:requiresSmallestWidthDp="480" />

First solution is totally bad. Only tablets can see my app in Google Play. Second solution is bad too, because it is able to download app on the devices with resolution 480x320px. This command android:requiresSmallestWidthDp="480" is unfortunately not using by filter in Google Play. It's caution in documentation here:

Caution: The Android system does not pay attention to this attribute, so it does not affect how your application behaves at runtime. Instead, it is used to enable filtering for your application on services such as Google Play. However, Google Play currently does not support this attribute for filtering (on Android 3.2), so you should continue using the other size attributes if your application does not support small screens.

Any ideas?

Thanks a lot.


Thanks Manolescu Sebastian for idea with tag <compatible-screens>. I dont know that exists something like this tag.

Solution is here:

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

    <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="xlarge" android:screenDensity="ldpi" />
    <screen android:screenSize="xlarge" android:screenDensity="mdpi" />
    <screen android:screenSize="xlarge" android:screenDensity="hdpi" />
    <screen android:screenSize="xlarge" android:screenDensity="xhdpi" />
</compatible-screens>
هل كانت مفيدة؟

المحلول

I think you can try this:

<compatible-screens>
<screen android:screenSize=["small" | "normal" | "large" | "xlarge"]
        android:screenDensity=["ldpi" | "mdpi" | "hdpi" | "xhdpi"] />
...

or

<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>

Source: http://developer.android.com/guide/topics/manifest/compatible-screens-element.html

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top