简体   繁体   English

Android如何使我的应用在分辨率小于480x800的设备上不可见

[英]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. 您好,我正在开发分辨率为480x800或更高的游戏。我不希望我的游戏能够从分辨率小于480x800的设备上下载并从Google Play上看到。 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? 对于分辨率小于480x800的设备,此代码会在Google Play中隐藏我的应用程序吗?

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). 您可以转到开发人员的控制台,在您的应用程序下,单击打开菜单的按钮(在您的应用程序旁边),然后单击“ APK”,在那里您可以看到“所有受支持的设备”和“排除的设备”只是转到受支持的设备并手动选择您不想要的设备(然后转到“排除的设备”部分)。

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; 使用DisplayMetrics,您可以找到实际设备的尺寸(以像素为单位)。 use them wisely. 明智地使用它们。 See the Android documentation for more information on how to use it. 有关如何使用它的更多信息,请参见Android文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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