简体   繁体   English

如何从Android Play Market过滤掉平板电脑和平板电脑?

[英]How to filter out Phablets and Tablets from Android Play Market?

I have an application that just designed for handsets. 我有一个专门为手机设计的应用程序。 I want this application be visible to just handsets in Play market. 我希望此应用程序仅对Play市场中的手机可见。 Based on my research I found that it's impossible. 根据我的研究,我发现这是不可能的。 So the solution that I found is adding <support-screen> into manifest. 因此,我找到的解决方案是将<support-screen>添加到清单中。

<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="15"/>

<supports-screens
        android:smallScreens="false"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="false"
        android:requiresSmallestWidthDp="320"
        android:largestWidthLimitDp="360"/>

Based on what supports-screens says for largestWidthLimitDp : 根据supports-screenslargestWidthLimitDp

This attribute allows you to force-enable screen compatibility mode by specifying the maximum "smallest screen width" for which your application is designed. 通过此属性,您可以通过指定应用程序要设计的最大“最小屏幕宽度”来强制启用屏幕兼容模式。 If the smallest side of a device's available screen is greater than your value here, the application runs in screen compatibility mode with no way for the user to disable it. 如果设备可用屏幕的最小边大于此处的值,则该应用程序将在屏幕兼容模式下运行,而用户无法禁用它。

Since size of GS3 is 720*1080px then I found 720px = 360dp . 由于GS3的大小为720 * 1080px,所以我发现720px = 360dp

However, the problem is Note from document: 但是,问题是来自文档的Note

Note: Currently, screen compatibility mode emulates only handset screens with a 320dp width, so screen compatibility mode is not applied if your value for android:largestWidthLimitDp is larger than 320. 注意:当前,屏幕兼容模式仅模拟宽度为320dp的手机屏幕,因此,如果android:largestWidthLimitDp的值大于320,则不应用屏幕兼容模式。

Therefore it shows android:largestWidthLimitDp is useless at the moment. 因此,它表明android:largestWidthLimitDp目前无效。 I think I have two ways: 我认为我有两种方法:

1- Filter out phablet/tablets from Play console which is not easy (it says your app is compatible with 3030 devices). 1-从Play控制台过滤掉平板手机/平板电脑,这并不容易(它说您的应用程序兼容3030设备)。

2- Displaying gentle apologies! 2-表示道歉! - to say sorry we don't support your device at the moment - in run time. -不好意思,我们目前不支持您的设备-运行时。 I think this is horrible and brings us 1 starts :( 我认为这太可怕了,给我们带来了1次开始:(

What you think? 你认为呢? Any suggestion would be appreciated. 任何建议,将不胜感激。 Thanks 谢谢

When you list your apk in the play store (developer console, you don't have to publish it yet) you can select what devices your app is compatible with. 当您在Play商店中列出apk(开发者控制台,您不必发布它)时,您可以选择您的应用兼容的设备。 It may be a pain, but you can run through that list and only select the phones you'd like. 可能会很痛苦,但是您可以浏览该列表,仅选择所需的电话。 This is the best way for what you are trying to do. 这是您尝试做的最好的方法。

Otherwise you'd have to resort to options that you listed above such as telling the user "Hey, we don't support your screen size". 否则,您将不得不诉诸上面列出的选项,例如告诉用户“嘿,我们不支持您的屏幕尺寸”。 And no one wants to see that. 而且没有人愿意看到这一点。

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

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