Android的M(6.0)权限 - AUTHENTICATE_ACCOUNTS [英] Android M (6.0) Permission - AUTHENTICATE_ACCOUNTS

查看:4824
本文介绍了Android的M(6.0)权限 - AUTHENTICATE_ACCOUNTS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想补充的Andr​​oid 6.0支持,我现有的Andr​​oid应用程序。我已经使用 SYNCADAPTER 来同步数据。它工作正常,直到22 API,但在23(ANDROID 6.0),他们必须删除组的权限 AUTHENTICATE_ACCOUNTS

I am trying to add Android 6.0 support in my Existing Android App. I have used SYNCADAPTER to sync data. its working fine till API 22. but in 23 (ANDROID 6.0) they have remove Group permission AUTHENTICATE_ACCOUNTS.

我发现样品如何让运行时允许的,我试过同 AUTHENTICATE_ACCOUNTS ,但它不能正常工作。

I found sample how to get run-time permission, I tried same with AUTHENTICATE_ACCOUNTS but it is not working.

我还发现了一个回答,有没有什么诀窍使用 AUTHENTICATE_ACCOUNTS 相同的答案?

I also found one answer, Is there any trick to use AUTHENTICATE_ACCOUNTS same as that answer?

我发现删除权限列表中 overhere 。所以,如果我的应用程序使用的列的权限。在这种情况下,是否有任何应用程序工作在Android中M(6.0)?

i found removed permissions list overhere. so if my app use that permission which is listed. in that case does any app works in Android M (6.0)?

推荐答案

。您可能正在使用这些如下:

When you used SyncAdapter you needed bunch of permissions before Android Marshmallow. You are probably using these below:

<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />

最后3人都不再需要。而第一个不需要或者,如果你只访问应用程序的帐户。

The last 3 of them are not needed anymore. And the first is not required either if you are accessing only your application's account.

所以只需添加安卓maxSdkVersion =22来这些权限,从不要求他们在安卓M.

So just add android:maxSdkVersion="22"to those permissions and never request them in Android M.

这篇关于Android的M(6.0)权限 - AUTHENTICATE_ACCOUNTS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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