让Android应用程序没有出售中的平板电脑 [英] Make android app not availble for tablets

查看:118
本文介绍了让Android应用程序没有出售中的平板电脑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发表我的Play商店的应用程序,我不希望它是适用于平板电脑。 我怎样才能做到这一点?

I am publishing my app in the Play store and i don't want it to be available for tablets. How can i make it happen?

我不希望Android的开发者控制台中手动排除每一个平板电脑,但我真的需要我的应用程序在智能手机完全运行。

I don't want to manually exclude every single tablet within the developer console of android but i really need my application to run exclusively on smartphone.

编辑: 我照你的建议,但这里的结果是:

I did as you suggested but here's the result:

和作进一步的解释:我需要我的应用程序上,正常的人叫智能手机,而不是正常的人叫平板电脑设备的设备上运行...例如它具有的Galaxy Tab的

And for further explanation: i need my app to run on devices that normal people call smartphone and not on devices that normal people call tablets... e.g. it has to run on "Galaxy Note 2" but not on "Galaxy Tab"

解决由于@CommonsWare:

SOLVED Thanks to @CommonsWare:

我必须设置我的清单如下标签:

I had to set the following tags in my manifest:

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

<compatible-screens>
    <!-- all small size screens -->
    <screen android:screenSize="small" android:screenDensity="ldpi" />
    <screen android:screenSize="small" android:screenDensity="mdpi" />
    <screen android:screenSize="small" android:screenDensity="hdpi" /> 
    <screen android:screenSize="small" android:screenDensity="xhdpi" />
    <!-- all normal size screens -->
    <screen android:screenSize="normal" android:screenDensity="ldpi" />
    <screen android:screenSize="normal" android:screenDensity="mdpi" />
    <screen android:screenSize="normal" android:screenDensity="hdpi" />
    <screen android:screenSize="normal" android:screenDensity="xhdpi" />
    <!-- all large size screens -->
    <screen android:screenSize="large" android:screenDensity="ldpi" />
    <screen android:screenSize="large" android:screenDensity="mdpi" />
    <screen android:screenSize="large" android:screenDensity="hdpi" />
    <screen android:screenSize="large" android:screenDensity="xhdpi" />
</compatible-screens>

和做到以下几点: 右键单击项目 - >属性 - >机器人 - >选择目标大于8

And do the following: Right click on project -> properties -> android -> select a target greater than 8

推荐答案

<一个href="http://developer.android.com/guide/practices/screens-distribution.html#FilteringHansetApps">http://developer.android.com/guide/practices/screens-distribution.html#FilteringHansetApps

...您可以使用该元素来管理你的应用程序中根据屏幕大小和密度的组合分布。外部服务,如谷歌播放使用这些信息来过滤应用到应用程序,从而使具有屏幕配置与声明只兼容设备可以下载应用程序。

...you can use the element to manage the distribution of your application based on combinations of screen size and density. External services such as Google Play use this information to apply filtering to your application, so that only devices that have a screen configuration with which you declare compatibility can download your application.

样品&LT;兼容屏&GT; 从该页面元素:

<manifest ... >
    <compatible-screens>
        <!-- all small size screens -->
        <screen android:screenSize="small" android:screenDensity="ldpi" />
        <screen android:screenSize="small" android:screenDensity="mdpi" />
        <screen android:screenSize="small" android:screenDensity="hdpi" />
        <screen android:screenSize="small" android:screenDensity="xhdpi" />
        <!-- all normal size screens -->
        <screen android:screenSize="normal" android:screenDensity="ldpi" />
        <screen android:screenSize="normal" android:screenDensity="mdpi" />
        <screen android:screenSize="normal" android:screenDensity="hdpi" />
        <screen android:screenSize="normal" android:screenDensity="xhdpi" />
    </compatible-screens>
    ...
    <application ... >
        ...
    <application>
</manifest>

不过,我也建议增加线 xxhdpi 的密度,因为这种器件现在(的Droid DNA,的Xperia Z,HTC蝴蝶等)。

However, I would recommend also adding lines for a density of xxhdpi, as such devices are shipping now (Droid DNA, Xperia Z, HTC Butterfly, etc.).

更新

首先,相对于构建的错误,如果你读的文档&LT;兼容屏&GT; 元素,你会发现,它被添加在API 9级,而对于一些奇怪的原因,你建立的目标设定时间超过

First, with respect to your build errors, if you read the documentation for the <compatible-screens> element, you will notice that it was added in API Level 9, and for some strange reason, you build target is set older than that.

其次,相对于

我需要我的应用程序上,正常的人叫智能手机设备,而不是正常的人叫平板电脑设备上运行...例如它具有的Galaxy Tab的

i need my app to run on devices that normal people call smartphone and not on devices that normal people call tablets... e.g. it has to run on "Galaxy Note 2" but not on "Galaxy Tab"

这是不可能的,只是因为你没有什么,你做一个具体的定义,不希望您的应用程序发货的。

This is not possible, simply because you do not have a concrete definition of what you do and do not want your app shipping on.

有在这个星球〜8个十亿正常人。欢迎您来采访他们每个人,并问他们什么他们认为银河注2。有些人会说一个电话。有些人会说平板电脑。有些人会说一个平板手机,这将不会是有用的。有些人会追着你离开自己的家园,声称已经带来了一些发光妖到他们中间(这也不会是有用的,而且可能是痛苦的,如果他们有石头顺手扔)。

There are ~8 billion "normal people" on the planet. You are welcome to interview each one of them and ask them what they think the Galaxy Note 2 is. Some will say a phone. Some will say a tablet. Some will say a "phablet", which will not be useful. Some will chase you out of their homes, claiming that you have brought some light-emitting demon into their midst (this too will not be useful, and may be painful if they have stones handy to throw).

如果,在某个时间点,在未来,你拿出你做一个科学的定义,不想出货您的设备上,提出一个新鲜的StackOverflow问题。所谓科学定义,我的意思是可以普遍适用,通过在所有设备,所有的人来决定你怎么做,不希望您的应用程序的算法。

If, at some point in time in the future, you come up with a scientific definition of what you do and do not want to ship your device on, ask a fresh StackOverflow question. By "scientific definition", I mean an algorithm that can be universally applied, by all people on all devices, to determine what you do and do not want your app on.

(请注意,所有的人,我不包括那些谁可能会认为你是一个恶魔贩子)

(note that by "all people", I am excluding those who might consider you to be a demon-monger)

例如:

  • 我想出货在具有电话功能的所有设备,无论屏幕大小的

  • "I want to ship on all devices that have telephony capability, regardless of screen size"

我想出货在具有屏幕尺寸小于所有设备,和 - 这么多英寸,其最小的一面:

"I want to ship on all devices that have a screen size smaller than such-and-so many inches on its smallest side:

这篇关于让Android应用程序没有出售中的平板电脑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆