gpt4 book ai didi

安卓 : SEND_SMS Permission not listed for tablet

转载 作者:行者123 更新时间:2023-11-29 01:30:18 26 4
gpt4 key购买 nike

我在 google play 上发布了我的应用程序,我的应用程序在手机和平​​板电脑上,该应用程序使用发送短信功能,以防我们在手机上发布我的应用程序时发送电子邮件google play,该应用程序不是从平板电脑下载的PS:对不起我的英语

这是我的 list

<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" />

最佳答案

这个问题有点老了,但也许有人会觉得答案有用。

  1. 有两种不同的声明uses-permissionuses-feature。它们具有不同的属性集和不同的权限/功能名称。
  2. uses-permission 声明没有android:required 属性,因此如果指定,将被忽略。
  3. uses-feature 声明具有 android:required 属性,您可以将其设置为 false 以禁用对此特定功能的过滤。
  4. Google Play 会自动从 uses-permission 声明中检测所需的设备硬件功能,并根据它们和 uses-feature 声明过滤搜索结果。有关隐式过滤的更多信息,请参阅 Google 文档 here .
  5. 当我们谈到过滤时,uses-feature 声明优先于 uses-permission 声明。

问题 list 中的错误是不正确的功能声明。在Android中是区分大小写的,应该是

<uses-feature android:name="android.hardware.telephony" android:required="false"/>

代替

<uses-feature android:name="android.hardware.TELEPHONY" android:required="false"/>

此修复后将不再过滤应用程序。您可以从所有权限声明中删除 android:required="false" 以使 list 变得干净:

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

暗示硬件功能及其名称的权限列表也可以在 Google 文档中找到 here

关于安卓 : SEND_SMS Permission not listed for tablet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31616490/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com