android - 为什么我的应用程序说我正在请求联系人权限?

标签 android android-contacts android-permissions

我有一个表盘应用,显示我正在请求通讯录权限...但我没有。我不明白这是为什么...

我有应用内结算,我可以访问 Google 健身数据......以及 Google Analytics。

这是我的 list 中的权限列表:

<!-- Normal Permissions -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="com.android.vending.BILLING" />

    <!-- Dangerous Permissions -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

    <!-- Permissions required by the wearable app -->
    <uses-permission android:name="com.google.android.permission.PROVIDE_BACKGROUND" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />

以下是来自 Play 商店的此应用权限列表:

In-app purchases
Identity
find accounts on the device
Contacts
find accounts on the device
Location
precise location (GPS and network-based)
approximate location (network-based)
Photos/Media/Files
modify or delete the contents of your USB storage
read the contents of your USB storage
Storage
modify or delete the contents of your USB storage
read the contents of your USB storage
Other
receive data from Internet
full network access
view network connections
run at startup
prevent device from sleeping
use accounts on the device

应用程序依赖项:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    wearApp project(':Wearable')
    testCompile 'junit:junit:4.12'
    compile 'com.google.android.support:wearable:1.3.0'
    compile 'com.google.android.gms:play-services:8.3.0'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.google.android.gms:play-services-analytics:8.3.0'
    compile files('libs/httpclient-4.5.1.jar')
    compile files('libs/apache-httpcomponents-httpclient.jar')
    compile files('libs/apache-httpcomponents-httpclient-cache.jar')
    compile files('libs/apache-httpcomponents-httpcore.jar')
    compile files('libs/apache-httpcomponents-httpmime.jar')
    compile files('libs/GoogleConversionTrackingSdk-2.2.4.jar')
    compile files('libs/feedback_v6.jar')
}

磨损依赖:

dependencies {
    compile 'com.google.android.support:wearable:1.3.0'
    compile 'com.google.android.gms:play-services:8.3.0'
    compile 'com.android.support:support-v13:23.1.0'
    compile 'com.google.android.gms:play-services-analytics:8.3.0'
}

最佳答案

在我的一个应用程序中,我遇到了一个问题,我的应用程序要求获得我从未要求过的权限,结果证明是 Google Play 服务造成的。

我们必须明确说明我们的应用需要 Google Play 服务的哪一部分。比如我们需要广告,就需要用

com.google.android.gms:play-services-ads:8.4.0

而不是

com.google.android.gms:play-services:8.4.0

然后 Google Play 服务会针对它所提供的所有服务请求许可,即使我们的应用不需要同样的许可。

请检查,https://developers.google.com/android/guides/setup#add_google_play_services_to_your_project只使用你需要的东西,看看是否能解决你的问题。

在您的情况下,我怀疑 Google 帐户登录是联系的原因。

希望这对您有所帮助。一切顺利。

关于android - 为什么我的应用程序说我正在请求联系人权限?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36299099/

相关文章:

php - 您无权访问此服务器上的 check.php

Android - 为现有联系人设置生日

android - 设置应用如何启动应用的非导出 Activity ?

android - 单击设置按钮时墙纸应用程序崩溃

java - 即使我声明了 Android 权限也不起作用

android - 如何使复选框在 android 中看起来更好

java - 如何设置BottomNavigationView的颜色?

android - 以编程方式编辑联系人的姓名/电话号码

android - 联系人未从 MI 手机中删除

java - 首先将 ListView 项目添加到列表底部