为什么我的应用程序说我正在请求“联系人"权限? [英] Why does my app say I am requesting permission for Contacts?

查看:108
本文介绍了为什么我的应用程序说我正在请求“联系人"权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表面应用程序,上面显示我正在请求联系人"权限...但是我没有.我不知道为什么会这样...

I have a watch face app that says I am requesting permissions for Contacts... but I'm not. I can't figure out why this is...

我有应用内帐单,可以访问Google健身数据...以及Google Analytics(分析).

I have in-app billing and I access Google fit data... as well as Google Analytics.

这是清单中的权限列表:

Here is a list of the permissions in my manifest:

<!-- 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商店中此应用程序权限的列表:

Here is a list from the Play store of the permissions for this app:

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服务.

In one of my apps, I faced an issue where I had my app asking for permissions which I never asked for, the reason for that turned out to be the Google play services.

我们必须明确提及我们的应用需要Google Play服务的哪一部分.例如,如果我们需要广告,则需要使用

We have to explicitly mention what part of Google play services we need for our app. For example, if we need ads, we need to use

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

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

而不是

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

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

发生的情况是,即使我们的应用程序不需要Google Play服务,它也会向其请求的所有服务寻求许可.

what happens is then Google play services will ask permission for all the services it caters to even if our app does not require the same.

https://developers.google.com/android/guides/setup#add_google_play_services_to_your_project ,仅使用您需要的内容,看看是否可以解决您的问题.

Please check, https://developers.google.com/android/guides/setup#add_google_play_services_to_your_project and use only what you need and see if that resolves your problem.

就您而言,我怀疑Google帐户登录是联系的原因.

In your case I suspect, Google Account Login as the reason for contacts.

希望这会有所帮助.一切顺利.

Hope this helps. All the best.

这篇关于为什么我的应用程序说我正在请求“联系人"权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆