java - 发布应用程序 - 在 Android Market 中受设备限制

标签 java android google-play

我即将在市场上发布我的 Android 应用程序,但我决定只为具有正常屏幕尺寸和高密度的设备(例如 HTC Desire)设计它。

除了具有与 HTC Desire 相同规范的设备外,此应用程序在任何其他设备上都无法正常显示。

我想知道如何才能限制市场上的应用程序以符合这些规范?

 <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package=""
      android:versionCode="1"
      android:versionName="1.0" android:installLocation="auto">

            <supports-screens 
                  android:smallScreens="false"
                  android:normalScreens="true" 
                  android:largeScreens="false"
                  android:xlargeScreens= "false"
                  android:anyDensity="false"
                  android:requiresSmallestWidthDp="480"
                  android:compatibleWidthLimitDp="480"
                  android:largestWidthLimitDp="480"/>

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-sdk android:minSdkVersion="8" />

    <application android:icon="@drawable/icon" android:label="@string/app_name" android:screenOrientation="landscape">
        <activity android:name=".PhonegapScreenshotPluginActivity"
                  android:label="@string/app_name"
                  android:configChanges="orientation|keyboardHidden" android:screenOrientation="landscape">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>
</manifest>

最佳答案

如果您的应用程序适用于 Android 3.2 及更高版本,您可以使用:

                 <supports-screens 
                  android:smallScreens="false"
                  android:normalScreens="true" 
                  android:largeScreens="false"
                  android:xlargeScreens= "false"
                  android:anyDensity="true"
                  android:requiresSmallestWidthDp="480"
                  android:compatibleWidthLimitDp="480"
                  android:largestWidthLimitDp="480"/>

否则你可以使用:

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

查看以下网址:

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

http://developer.android.com/guide/practices/screens_support.html

我还想与您分享以下文字:

普通屏幕是什么意思?

We tell Android that we only support devices that fall into the normal screens class. Note that this doesn’t necessarily imply that our application isn’t installable anymore on other devices. It doesn’t even mean that it’s doomed to break on them, but it has other implications. We didn’t mention actual sizes in pixels or densities in dpi.

更多详情,请阅读第146页 http://www.manning.com/collins/AiP_sample_ch04.pdf

关于java - 发布应用程序 - 在 Android Market 中受设备限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8786147/

相关文章:

android - 根据电话号码添加原始联系人时联系人重复

android - Google Play 控制台阻止上传或推广符合敏感权限政策的新应用版本

android - 申请提交审核时间Google Play

java - 如何限制类列表仅包含类的子类(可能是抽象类)

java - 如何递归地找到链表中倒数第二个出现的 Char ?

java - 如何让 ProGuard 保留整个(整个)类(带有字段和方法)而不使用 "-keep"

android - ORMLite 和惰性集合的问题

google-analytics - 应用程序安装程序 ID(未设置)下载来自哪些市场?

java - 如何从没有特定名称的 JSONObject 中获取字符串

Java获取剪贴板的字节