为什么应用商店里搜索不到你的App?

来源:互联网 发布:php工程师个人介绍 编辑:程序博客网 时间:2024/04/27 17:59

最近连续有国外的客户报告在某些特定的Android设备上搜索不到我们的应用。一开始怀疑uses-feature的设置排除了硬件不支持的设备。我们在manifest里有以下设置:

<uses-feature android:glEsVersion="0x00020000" ></uses-feature>

该设置会排除不支持OpenGL ES 2.0的设备,但是客户报告的设备Sony Xperia Tablet Z是支持OpenGL ES 2.0的。需要注意的是,据《Beginning Android Games》一书所说,这个东西,有时候不灵(感谢这篇博客)。

NOTE: This feature is reported incorrectly by some devices out there, making your application invisible to otherwise perfectly fine devices. Use it with caution.

更稳妥的做法是设置required为false。这表示不支持OpenGL ES 2.0的设备也可以搜索到App并安装,但是需要在代码里判断做一些该做的事。

<uses-feature android:glEsVersion="0x00020000" required="false"></uses-feature>

排除这个,继续找原因。manifest里还有一些permission,有些permission需要硬件权限,即,其隐含了uses-feature,也会排除一些不支持该feature的设备。检查我们App的设置,有如下两项。

<uses-permission android:name="android.permission.READ_PHONE_STATE" />

<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/>

PROCESS_OUTGOING_CALLS需要android.hardware.telephony,就是说等同于设置了“android.hardware.telephony”的uses-feature,不支持电话功能的tablet,无法在应用商店里搜索到该应用。 测试一下这个猜测,在ASUS TF101(没有电话功能)上的Google Play搜索,搜不到我们App,在Samsung Nexus S手机上的Google Play搜索同样的关键词,可以搜到我们的App。感谢这篇博客。

测试一下这个猜测,在ASUS TF101(没有电话功能)上的Google Play搜索,搜不到我们App,在Samsung Nexus S手机上的Google Play搜索同样的关键词,可以搜到我们的App。感谢这篇博客。

其实,Google的developer.android.com里都介绍了上面说的这些。仔细阅读以下内容还是很有必要的。

1. Google Play and Feature-Based Filtering: http://developer.android.com/guide/topics/manifest/uses-feature-element.html#market-feature-filtering

2. uses-feature element:http://developer.android.com/guide/topics/manifest/uses-feature-element.html

3. Permissions:http://developer.android.com/guide/topics/security/permissions.html

如果需要设置一个permission,但又不希望其implicit的uses-feature过滤掉设备,可以用uses-feature的android:required="false"属性设置来达到目的。

再试验一下,修改manifest后做了一个App的签名apk上传到Google Play,不发布,只看一眼预览,可以看到,之前支持1247个设备(不支持1891个),现在支持1638个设备(391 added)。

显示remove掉了“android.hardware.telephony”这个feature的过滤。


<script type="text/javascript"><!--google_ad_client = "ca-pub-1944176156128447";/* cnblogs 首页横幅 */google_ad_slot = "5419468456";google_ad_width = 728;google_ad_height = 90;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击