仅定位 Android Market 上的高分辨率(像素)设备

发布于 2024-09-18 04:12:24 字数 239 浏览 12 评论 0原文

我想发布一个仅在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

眼泪都笑了 2024-09-25 04:12:24

不幸的是,在当前的市场状况下,您无法做到这一点。根据 参考文档 - 您只能按“屏幕尺寸”进行过滤,正如您所指出的,WVGA/FWVGA 分辨率是“正常”。

您可以让您的应用程序使用 DisplayMetrics 类(使用 heightPixelswidthPixels)以编程方式检测它,但这只是在购买/安装之后,这就是我猜你想避免。

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 using heightPixels and widthPixels but that's only after it's been purchased/installed, which is what I assume you want to avoid.

半葬歌 2024-09-25 04:12:24

我还没有在Android上尝试过这个,但我认为这应该可行:

  • 让你的应用程序成为试用应用程序,这样它就可以免费下载,但一天后就不再免费了。
  • 现在,在您的应用程序中执行两件事之一,在应用程序启动时检测屏幕尺寸并仅显示一条通用消息,说明不支持此屏幕分辨率并显示退出按钮。另一种方法是让 layout-480x320 文件夹显示相同的消息并提供退出按钮以退出应用程序。通过这种方式,您可以让所有不支持的屏幕尺寸显示此消息并且没有任何功能。当然,默认的 layout 文件夹将具有适合您支持的屏幕尺寸的 UI。这样,在不支持的设备上,您还可以在消息中说明所有手机都受支持。
  • 不要忘记在清单文件中添加
  • 现在,当用户在不支持的设备上下载您的应用程序时,他/她将不会因为一日试用而被收取费用,并且还会清楚地显示他/她的设备不受支持,并且可以退出并卸载该应用程序。

这不会使您的应用程序在不支持的分辨率上不可见,但允许使用干净简单的机制与用户进行通信。

I havent tried this on Android but I think this should work:

  • Make your app a trial app, so that it is free to download but not free say after one day.
  • Now in your app do one of the two things, on app start either detect the screen size and just display a generic message saying this screen resolution is not supported and display the exit button. Another way to do this is is to have 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 default layout 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.
  • Dont forget to have <supports-screens android:anyDensity="false" /> in your manifest file.
  • Now when user downloads your app on non supported devices he/she will not be charged because of one day trial and also will be clearly shown that his/her device is not supported and can exit and uninstall the app.

This wont make your app invisible on non supported resolutions but allows for clean and simple mechanism to communicate to user.

秉烛思 2024-09-25 04:12:24

经过一番谷歌搜索后,我发现清单配置如下:

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

就像此处所述。

根据您的情况,您可以减少下载量至以下尺寸:

WVGA800 (480x800)
WVGA854 (480x854)
600x1024

的屏幕占有 71% 的市场份额。

向下滚动以下链接以查找市场份额和决议“名称”。

市场份额

向下滚动查找分辨率名称

希望这对您有所帮助。干杯

after hitting google hard i found as manifest config:

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

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

清风夜微凉 2024-09-25 04:12:24

更新:这不起作用(请参阅下面的评论)

在您的清单中:

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

UPDATE: This does not work (see comments below)

In your manifest:

<supports-screens 
     android:largeScreens="true"
     android:normalScreens="false" 
     android:smallScreens="false"/>
脱离于你 2024-09-25 04:12:24

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文