- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
在我的 list 中,我只要求这两个权限:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
但是当我在手机上安装该应用程序时,我也会收到此通知:
Low-risk permissions
Phone ID
Get your phone ID, including IMEI, IMSI, etc.
根据我从 this SO answer 收集到的信息,我应该需要使用 TelephonyManager
并调用
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
需要此权限。但我没有使用 TelephonyManager 或调用该权限。我不想要求用户授予此权限。我查看了我的 list 和 gradle 文件。会不会是我使用的某些代码在没有我特别要求的情况下触发了此权限?我知道我不会给你很多继续的东西,因为我不知道还有什么地方可以看。
更新 1
我在 Android Studio 中创建了一个全新的项目,并从中生成了一个签名的 APK。我安装了它,但没有询问任何权限。 (这至少让我确认,并不是 Android Studio 中的某些“新功能”自动请求此权限。)
更新 2
在@antonio 的回答中,我找到了 app/build/outputs/logs/manifest-merger-release-report.txt
但是,我没有发现任何隐含的权限请求。
更新 3
以下是我的应用使用的依赖项(来自 gradle.build):
dependencies {
compile 'com.android.support:support-v4:21.0.3'
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
}
我用这两个依赖项测试了一个新应用程序,没有请求任何权限。
我的下一步是从头开始重新添加每个 Activity ,看看我是否可以找到开始调用此权限的位置。待续……
更新 4
我试过将所有内容复制到一个新项目并重构项目名称并删除部分,但事实证明它非常复杂。我无法找出原因。
更新 5
我将 targetSdkVersion 设置为 1。这会在安装应用程序之前宣布权限时给出一条新消息:
read phone status and identity
Allows the app to access the phone features of the device. This permission allows the app to determine the phone number and device IDs, whether the call is active, and the remote number connected by a call.
我在开头写的旧电话 ID 权限通知仍然存在(安装应用程序后显示)。这让我想知道它是否与操作系统有关(我在小米手机上使用 MIUI Android)。仍然有一些关于应用程序的东西导致它显示在这个应用程序中而不是在其他应用程序中。接下来我需要在其他设备上对此进行测试。
最佳答案
发生这种情况是因为您导入的库的 targetSdkVersion 低于应用程序的 targetSdkVersion
来自Manifest Merger documentation :
When importing a library with a targetSdkVersion lower than the importing application targetSdkVersion, some permissions maybe automatically added to the resulting merged manifest file. This is necessary since such libraries targeted runtimes where such permissions were implicitly granted. Therefore declaring such permission was not necessary. However in more recent Android releases, these permissions are not automatically granted. Therefore, a library targeting such old runtime without the permissions would not work properly once merged in the application targeting a more recent runtime.
可以添加的权限有:
您可以检查 Manifest Merger 生成的报告(在\app\build\outputs\logs\manifest-merger-XXX-report 中)以查看是哪个库导致添加了 READ_PHONE_STATE 权限。你会看到类似这样的东西:
android:uses-permission#android.permission.READ_PHONE_STATE
IMPLIED from AndroidManifest.xml:2:1 reason: the.library has a targetSdkVersion < 4
在多模块 gradle-project 中,必须应用匹配的配置,如 defaultConfig{ ... },其中应指定 targetSdkVersion 以解析这些 IMPLIED 权限。
关于android - 为什么我的应用程序要求电话 ID 权限?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30277242/
我有一个包含姓名、电子邮件和内容文本区域的表单。一切正常,但当我尝试为手机号码添加 1 个表单输入时,表单不会提交。 Javascript: function hgsubmit() { i
所以我正试图在 Scheme 中找出整个 call/cc 的东西。下面是我正在使用的代码: (+ 1 (call/cc (lambda (k) (if (number? k)
所以我正试图在 Scheme 中找出整个 call/cc 的东西。下面是我正在使用的代码: (+ 1 (call/cc (lambda (k) (if (number? k)
我在 list 中有权限: 检查电话是否正在使用的代码可能会为无法接听电话的平板电脑等设备启动安全异常。所以,我制作了这个方法来检查是否设备可以使用 TelephonyManager: priva
我想知道 facebook API 允许 PHP 网页提取以下用户数据的先决条件是什么: 姓名 电子邮件 电话 据我了解,提取电话号码需要您的网站在 facebook/Websense 的白名单中吗?
我如何从我的应用程序调用特定号码的电话?给我一些执行此任务的逻辑或代码... 最佳答案 使用 UIApplication 的 openURL: 方法: [[UIApplication sharedAp
在 URI 中,空格可以编码为 + .既然如此,那么在创建具有国际前缀的 tel URI 时是否应该对前导加号进行编码? 哪个更好?两者在实践中都有效吗? Call me Call me 最佳答案 不
我正在尝试使用 Insomnia 调用 SOAP 电话 - 特别是试图让帖子成功。我将 URL 定义为端点,并将正文类型作为带有 SOAP 内容(信封、标题、正文)的 XML。我在标题中定义了用户 I
服务器有没有办法将一些数据无线无缝地推送到客户端,可能是 Windows(电话)、iPhone、Mac 或 Android 设备,没有任何操作系统集成? 如果是这样,最好的设计模式是什么,最好的技术是
我有一个搜索字段,我希望用户能够通过电话或电子邮件进行搜索。但是,我的 onclick 事件没有触发。我已经尝试过控制台工具,但似乎无法通过那里进行调试。 {% from "_form
如果重新加载接收调用的浏览器窗口,我将面临实时 Twilio 调用被丢弃的情况。有没有办法在不影响实时通话的情况下克服这种挫折? 最佳答案 Twilio 布道者在这里。 根据您的问题,我假设您使用的是
我试图在我的服务中减少我的 promise 对象。我有类似的东西 angular.module('myApp').service('testService', ['Employees','$q',
我想在我的java应用程序中构建一个电话调用器。为此,我使用了 JAIN-SIP 库。第一次 INVITE 后,系统需要代理身份验证。第二个邀请是在“AuthenticationHelperImpl.
两天前我正在开发一个 VOIP 应用程序,并成功地使用 Sinch 实现了一个普通的应用程序到应用程序调用。 .该应用程序运行良好。当我开始时,我在他们的文档中看到他们支持电话 session 。 现
我正在尝试创建一个 java 程序,它将创建 excel 文件并将其上传到谷歌驱动器中。上传后我需要它来授予权限。我已经完成了所有这些,但问题在于尝试将 excel 文件转换为 google 文件,以
我想使用 Android Sip 进行电话 session .那可能吗?有人可以举一个有效的例子吗?使用该库是否有任何限制,比如它可以在 3G 或 4G 上工作? 最佳答案 当前的 Android S
是否可以通过编程方式在 android 中接听电话? 我发现有些地方不可能,但后来安装了应用程序 https://play.google.com/store/apps/details?id=com.a
我试图在单击导航中的某个按钮后将一个类附加到 div。 $navButtons.on('click', navigationClick); // liseten to the navigation a
在 Monotouch 中是否有任何方法可以读取电话或调用者服务的当前状态? 我正在尝试寻找某种方式来读取通话是否处于事件状态或通话是否处于等待状态等。 用谷歌搜索没有找到任何结果。 希望运行一些代码
我可能正在搜索错误的内容,这可能解释了为什么我只能找到有关设置密码自动填充的信息。 我正在寻找用户能够在应用程序中输入电子邮件、电话、名字和姓氏的功能,就像某些网站能够做到的那样,选项出现在键盘上方。
我是一名优秀的程序员,十分优秀!