仅定位 Android Market 上的高分辨率(像素)设备
我想发布一个仅在 800x480 或更高屏幕上运行的应用程序。
我不希望拥有 480x320、320x240 等设备的用户从 Android Market 获取它。我该如何配置它?
市场过滤器似乎有答案,但我仍然不明白它。
I want to publish an application that specifically runs only on 800x480 or higher screens.
I don't want users with 480x320, 320x240 etc devices to get it from Android Market. How do I configure it?
Market Filters seems to have the answer but I still don't get it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(5)
不幸的是,在当前的市场状况下,您无法做到这一点。根据
参考文档 - 您只能按“屏幕尺寸”进行过滤,正如您所指出的,WVGA/FWVGA 分辨率是“正常”。您可以让您的应用程序使用
DisplayMetrics
类(使用heightPixels
和widthPixels
)以编程方式检测它,但这只是在购买/安装之后,这就是我猜你想避免。Unfortunately, in the current state of the Market, you aren't able to do this. According to the
<supports-screens>
reference doc - you can only filter by the "screen size", and as you noted, the WVGA/FWVGA resolutions are "normal."You can have your app detect it programatically using the
DisplayMetrics
class usingheightPixels
andwidthPixels
but that's only after it's been purchased/installed, which is what I assume you want to avoid.我还没有在Android上尝试过这个,但我认为这应该可行:
layout-480x320
文件夹显示相同的消息并提供退出按钮以退出应用程序。通过这种方式,您可以让所有不支持的屏幕尺寸显示此消息并且没有任何功能。当然,默认的layout
文件夹将具有适合您支持的屏幕尺寸的 UI。这样,在不支持的设备上,您还可以在消息中说明所有手机都受支持。
。这不会使您的应用程序在不支持的分辨率上不可见,但允许使用干净简单的机制与用户进行通信。
I havent tried this on Android but I think this should work:
layout-480x320
folder display the same message and provide an exit button to exit the app. This way you can have all non supported screen sizes display this message and have no functionality. The defaultlayout
folder will have the UI for your supported screen sizes of course. This way on non supported devices you can also say what all handsets are supported in the message.<supports-screens android:anyDensity="false" />
in your manifest file.This wont make your app invisible on non supported resolutions but allows for clean and simple mechanism to communicate to user.
经过一番谷歌搜索后,我发现清单配置如下:
就像此处所述。
根据您的情况,您可以减少下载量至以下尺寸:
WVGA800 (480x800)
WVGA854 (480x854)
600x1024
的屏幕占有 71% 的市场份额。
向下滚动以下链接以查找市场份额和决议“名称”。
市场份额
向下滚动查找分辨率名称
希望这对您有所帮助。干杯
after hitting google hard i found as manifest config:
like described here.
in your case you can reduce downloads to the following sizes:
WVGA800 (480x800)
WVGA854 (480x854)
600x1024
those screens have 71% share of the market.
scroll down on the following links to find market shares and resolution "names".
market share
scroll down to find resolution names
Hope that's helpin' out. Cheers
更新:这不起作用(请参阅下面的评论)
在您的清单中:
UPDATE: This does not work (see comments below)
In your manifest:
就 Android app 而言,我不确定。好问题。
但是,如果您使用 HTML/Javascript 编写浏览器应用程序,则可以结合使用 screen.width/height、document.documentElement.clientWidth/Height 和其他一些方法来签入 Javascript。如果您确实愿意,这将是一种阻止低分辨率计算机访问您的网站的方法。
您还可以使用媒体查询指定 CSS 根据屏幕大小做出不同的反应,尽管这不是阻塞,而是更多地适应环境。
Quirksmode 网站有一篇很好的文章,介绍了确定屏幕尺寸和其他属性的复杂性移动浏览器环境。
As far as an android app is concerned, I'm not sure. Good question.
However if you're writing a browser app in HTML/Javascript, you can check in Javascript using a combination of the screen.width/height, document.documentElement.clientWidth/Height, and a few other methods. If you really wanted to, this would be a way of blocking your site from low-res machines.
You can also specify CSS to react differently according to the screen size using media queries, although that would be less about blocking and more about adapting to suit the environment.
The Quirksmode website has a good article about the intricacies of dtermining screen size and other attributes in a mobile browser environment.