简体   繁体   中英

Android how to make my app not visible for devices with resolution smaller than 480x800

Hello I'm developing a game with resolution 480x800 or bigger.I don't want my game be able to download and seen from google play from devices which have resolution smaller than 480x800. How can I do this here is my manifest ,I'm not sure will this code solve the problem :

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

<compatible-screens>
     <!-- no small screens -->

     <!-- screens which are 480x800 or bigger resolution -->
    <screen android:screenSize="normal" android:screenDensity="mdpi"></screen>
    <screen android:screenSize="normal" android:screenDensity="hdpi"/><screen />
    <screen android:screenSize="normal" android:screenDensity="xhdpi"></screen>

    <screen android:screenSize="large" android:screenDensity="ldpi"/>
    <screen android:screenSize="large" android:screenDensity="mdpi"></screen>
    <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"/>

    <!-- Special case for Nexus 7 -->
   <screen android:screenSize="large" android:screenDensity="213" />


</compatible-screens>

Will this code hide my application in google play for devices which have resolution smaller than 480x800?

You can go to the developer's console, under your app click the button that opens the menu (next to your app) and click "APK", on there you can see "All supported devices" and "Excluded Devices" just go to supported devices and pick manually the ones you don't want (and they go to the "excluded devices" section).

Although I suggest to just "resize" the game for smaller screens, at most cases it's going to be better!

With DisplayMetrics you can find the dimensions of the actual device in pixels; use them wisely. See the Android documentation for more information on how to use it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM