简体   繁体   English

Android Market筛选出平板电脑

[英]Android market filter out tablets

I have scoured the internet for this answer, and I feel like I keep getting close to it but then it turns out to not be quite what I want. 我已经在互联网上搜寻了这个答案,感觉就像我一直都在接近它,但事实证明这并不是我想要的。 If someone posts a quick link that specifies exactly what I need I will be quite disappointed in myself... 如果有人发布了一个明确说明我需要的快速链接,我会对自己感到非常失望...

I am making an Android app whose minimum api is 4 and android version is 1.6. 我正在制作一个最小api为4且android版本为1.6的Android应用。 It works on tablets, but it is not optimized quite yet, so when I publish it I do not want tablets to be able to find it at all. 它可以在平板电脑上使用,但尚未进行优化,因此,当我发布它时,我根本不希望平板电脑能够找到它。 I have read the support screens android pages about adding this code to my manifest: 我已阅读了有关将此代码添加到清单中的支持屏幕android页面:

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

That particular code ( android:xLargeScreens="false") is not supported with android 1.6, so I cannot add that to my manifest. android 1.6不支持该特定代码(android:xLargeScreens =“ false”),因此无法将其添加到清单中。 The definition of each screen is pretty vague as well... for instance, the large screen size is defined as "a screen that is significantly larger than a "normal" handset screen". 每个屏幕的定义也很模糊……例如,大屏幕尺寸定义为“比“常规”手机屏幕大得多的屏幕”。 Does that mean the largeScreens are tablets as well? 这是否意味着largeScreens也是平板电脑? Do I need to set that to false?? 我需要将其设置为false吗?

So since that is not an option, and knowing my specs... how do I filter my app in the android market so that it does not show up for tablets? 如此以来,这是不是一种选择,知道我的规格... 如何过滤我在Android Market的应用程序,以便它不显示为平板电脑?

I think all you have to do is remove the screen support for big screens. 我认为您要做的就是删除大屏幕的屏幕支持。

http://developer.android.com/guide/topics/manifest/supports-screens-element.html http://developer.android.com/guide/topics/manifest/supports-screens-element.html

So that the market would know your app is only compatible on certain screens. 让市场知道您的应用仅在某些屏幕上兼容。

  1. AFAIK, it is impossible to close that xlargescreen possibility - you have set the problem correctly. AFAIK,不可能关闭xlargescreen的可能性-您已正确设置了问题。
  2. Don't be afraid of all tablets - there are very many cheaper ones that have screen smaller than that of modern phones. 不用担心所有平板电脑-屏幕价格比现代手机便宜的很多平板电脑。
  3. Don't be afraid of greater tablets, too. 也不要害怕更大的平板电脑。 Their owners are accustomed that SW for elder than APK 9 versions are not optimized for their devices. 其所有者习惯于APK 9之前版本的SW并未针对其设备进行优化。 It couldn't be. 不可能。

Edit: cite from the android developer guide : 编辑:从android开发人员指南中引用:

Caution: If you use the <supports-screens> element for the reverse scenario (when your application is not compatible with larger screens) and set the larger screen size attributes to "false", then external services such as Android Market do not apply filtering. 注意:如果在相反的情况下使用<supports-screens>元素(当您的应用程序与大屏幕不兼容时)并将大屏幕尺寸属性设置为“ false”,则外部服务(例如Android Market)将不应用过滤。 Your application will still be available to larger screens, but when it runs, it will not resize to fit the screen. 您的应用程序仍可用于较大的屏幕,但是在运行时,将无法调整大小以适合屏幕。 Instead, the system will emulate a handset screen size (about 320dp x 480dp; see Screen Compatibility Mode for more information). 取而代之的是,系统将模拟手机的屏幕尺寸(大约320dp x 480dp;有关更多信息,请参见屏幕兼容模式 )。 If you want to prevent your application from being downloaded on larger screens, use <compatible-screens> , as discussed in the previous section about Declaring an App is Only for Handsets . 如果要防止在较大的屏幕上下载应用程序,请使用<compatible-screens> ,如上一节“ 声明应用程序仅用于手机”中所述

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

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