我在Google Play上发布了我的应用程序,我的应用程序在手机和平板电脑上,该应用程序使用SMS的发送功能,以防万一我们在电话上发送电子邮件,并且如果我们在Google Play上发布我的应用程序时不方便,则发送电子邮件,该应用不是从平板电脑下载的
PS:对不起,我的英语
这是我的清单
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.package.myapps"
android:versionCode="10"
android:versionName="1.107" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="20" />
<compatible-screens>
<screen android:screenSize="normal" android:screenDensity="480" />
<screen android:screenSize="large" android:screenDensity="480" />
<screen android:screenSize="xlarge" android:screenDensity="480" />
<screen android:screenSize="normal" android:screenDensity="640" />
<screen android:screenSize="large" android:screenDensity="640" />
<screen android:screenSize="xlarge" android:screenDensity="640" />
<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" />
<!-- all xlarge size screens -->
<screen android:screenSize="xlarge" android:screenDensity="ldpi" />
<screen android:screenSize="xlarge" android:screenDensity="mdpi" />
<screen android:screenSize="xlarge" android:screenDensity="hdpi" />
<screen android:screenSize="xlarge" android:screenDensity="xhdpi" />
<!-- Special case for Nexus 7 -->
<screen android:screenSize="large" android:screenDensity="213" />
</compatible-screens>
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:resizeable="true"
android:anyDensity="true"/>
<uses-feature android:name="android.hardware.TELEPHONY" android:required="false" />
<uses-feature android:name="android.hardware.location.GPS" android:required="false" />
<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.wifi" android:required="false" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" android:required="false" />
<uses-permission android:name="android.permission.SEND_SMS" android:required="false" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" android:required="false" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" android:required="false" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" android:required="false"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:required="false"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="false" />
<permission
android:name="com.package.myapp.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.package.myapp.permission.MAPS_RECEIVE" />
最佳答案
这个问题有点老了,但也许有人会觉得答案有用。
有两个不同的声明uses-permission
和uses-feature
。它们具有不同的属性集和不同的权限/功能名称。android:required
声明没有uses-permission
属性,因此如果指定,它将被忽略。uses-feature
声明具有android:required
属性,您可以将其设置为false
以禁用对此特定功能的过滤。
Google Play会自动从uses-permission
声明中检测所需的设备硬件功能,并根据它们和uses-feature
声明对搜索结果进行过滤。有关隐式过滤的更多信息,请参见Google文档here。
在谈到过滤时,uses-feature
声明的优先级高于uses-permission
声明。
问题清单中的错误是特征声明不正确。在Android中区分大小写,应为
<uses-feature android:name="android.hardware.telephony" android:required="false"/>
代替
<uses-feature android:name="android.hardware.TELEPHONY" android:required="false"/>
此修复程序之后,将不再过滤应用程序。您可以从所有权限声明中删除
android:required="false"
以使清单干净:<uses-permission android:name="android.permission.SEND_SMS"/>
暗示硬件功能及其名称的权限列表也可以在Google文档here中找到