大头
Table_bottom

标签云
Table_bottom

分类
Table_bottom

日历
二月
28293031123
45678910
11121314151617
18192021222324
252627282912
Table_bottom

评论
Table_bottom

留言
Table_bottom

微博
Table_bottom

热门文章
Table_bottom

随机文章
Table_bottom

豆瓣上谁关注这里
Table_bottom

链接
Table_bottom

搜索栏
Table_bottom

RSS
RSS Link
Table_bottom

功能
Table_bottom

页面
Table_bottom

计数器
464708
Table_bottom

访客统计
Table_bottom

存档
Table_bottom

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

loveisbug posted @ 2013年6月05日 15:38 in 工作 with tags Android , 2824 阅读

最近连续有国外的客户报告在某些特定的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.

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

<uses-feature android:glEsVersion="0x00020000" android: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。感谢这篇博客

其实,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的过滤。

这个故事结束了,经上线验证,可行。接下来是另一个故事。

有个日本客户,拿两台Acer Iconia Tab测试,一台A100,一台A500。报告我们说某款应用在A100上可以安装,A500上显示“未對應裝置”,无法安装。但是在Google Play Developer Console里显示为“對應裝置”。

在Developer Console里都显示为对应装置,应该不是上述故事中说的坑。而A100和A500的区别是,A100的屏是7.0 inches,1024*600 pixels,A500的屏是10.1 inches,1080*800 pixels。

在一篇日文文章里提到Motorola Xoom 10英寸平板遇到的类似问题时有这么一句:

Xoomは10インチタブレットなので、xlargeサイズ扱いとなり、対象外になってしまったと。

Google翻译说:

Xoom是10英寸平板电脑,大小XLARGE处理,

虽然不懂日语,但也知道这和android:xlargeScreens="true"有关。可是,在另一款App的manifest文件里,也没有如下设置,却不会在A500上有问题。

<supports-screens android:xlargeScreens="true" />

差异在android:targetSdkVersion。

android:xlargeScreens属性是从API level 9(Android 2.3)开始才支持的。出问题的那款App,没有显式指定android:targetSdkVersion,于是targetSdkVersion等于minSdkVersion,为8。

经测试,指定targetSdkVersion为9即可解决该坑。 

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="9" />
CBSE Class 3 Sanskri 说:
2022年9月17日 20:16

For all chapters of the course, get the CBSE Board Class 3 Sanskrit Sample Paper 2023 Pdf. Every year, the board's subject-matter experts establish and revise the course syllabus for all sessions of Terms 1 and 2. CBSE Class 3 Sanskrit Question Paper Download the practise question bank from Set wide to practise at home if you have selected Sanskrit as your second or third language. For the most crucial questions for each chapter of the course, get in touch with your class teacher at the university.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter