支持LG G3,仅限于手机设备。

3
我有一个只能在手机上使用的Android应用程序。目前我已经在清单文件中设置了兼容屏幕元素,参考了Google文档中的示例。最近有用户抱怨说Play商店显示该应用程序与他们的LG G3手机不兼容。经过调查,我发现问题很可能是由于手机屏幕分辨率与我定义的屏幕不兼容所致。我看到了这篇文章Android app on Google Play Store is not compatible with LG G3 (Density 538, Size 2560x1440)?,其中显示必须定义一个额外的屏幕元素。我的问题是,有人可以确认使用此额外的屏幕元素,将screenSize设置为normal,将screenDensity设置为640是否可行?
<screen android:screenDensity="640" android:screenSize="normal" />

我希望允许拥有这款手机的用户使用该应用程序,但目前我想将应用程序限制在仅支持的手机上。
谢谢!
<uses-sdk
    android:minSdkVersion="10"
    android:targetSdkVersion="10" />

<!-- Only permit app to be used on handsets, prevent tablets -->
<compatible-screens>
    <!-- all small size screens -->
    <screen android:screenDensity="ldpi" android:screenSize="small" />
    <screen android:screenDensity="mdpi" android:screenSize="small" />
    <screen android:screenDensity="hdpi" android:screenSize="small" />
    <screen android:screenDensity="xhdpi" android:screenSize="small" />
    <screen android:screenDensity="480" android:screenSize="small" />
    <!-- all normal size screens -->
    <screen android:screenDensity="ldpi" android:screenSize="normal" />
    <screen android:screenDensity="mdpi" android:screenSize="normal" />
    <screen android:screenDensity="hdpi" android:screenSize="normal" />
    <screen android:screenDensity="xhdpi" android:screenSize="normal" />
    <!-- Nexus 5 : 445ppi -->
    <screen android:screenDensity="480" android:screenSize="normal" />
    <!-- LG G3 QHD Resolution -->
    <screen android:screenDensity="640" android:screenSize="small" />
    <screen android:screenDensity="640" android:screenSize="normal" />
</compatible-screens>

1
如果在<supports_screens>标签中使用android:largestWidthLimitDp="599",会发生什么呢?因为7英寸平板电脑的宽度为600dp。那么看起来您不需要所有兼容的屏幕。但我想真正的问题是,您认为什么样的设备才算是平板电脑,因为有些6英寸的手机也可以被视为小型平板电脑。 - tyczj
@tyczj 不确定,我需要测试一下然后再回复你。 - Phil
你不只是想将xxhdpi和xxxhdpi添加到你的支持列表中吗? - Simon
@Phil,这个对你有用吗? - Ayesh Qumhieh
1
@aqm 是的,我相信它起作用了。我没有收到任何G3用户的投诉,所以我认为一切都正常工作。 - Phil
显示剩余2条评论
1个回答

0
据我所记,我可以在我的 PlayStore 发布账户中允许我的应用程序为每个设备单独发布。这将更加准确,但难以维护。
另一种方法:尝试找到一个共享您想要定位的设备的特性。相应地设置一个“uses feature”标签。我会立刻想到“电信”这个功能。所有功能和使用情况:http://developer.android.com/guide/topics/manifest/uses-feature-element.html 有关所有筛选器的通用信息:http://developer.android.com/google/play/filters.html

但这将使应用程序在一些支持通话的平板电脑中列出。 - Kantesh

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接