2017-06-23 1 views
-1

Bitte lassen Sie mich wissen, was ist die Identität Berechtigungen? Und wie man aus dem Code diese Art von Erlaubnis implementiert?Wie frage ich nach Identitätserlaubnis in Android?

Ich habe bereits Kontakte lesen und andere Laufzeitberechtigungen implementieren, aber nichts über Identitätserlaubnis zu finden.

+0

möglich doppelte Frage pls dies überprüfen https://stackoverflow.com/questions/33295810/where -ist-die-app-erlaubnis-für-identität-in-android-marshmallow –

Antwort

0
Identity – With this permission the app can find accounts on the device, see and modify the owner’s contact card and add or remove contacts from the device. The permission **group CONTACTS deals with the user’s contacts while ACCOUNT_MANAGER deals with the user’s accounts.** 

<uses-permission android:name="android.permission-group.CONTACTS"/> 
<uses-permission android:name="android.permission.ACCOUNT_MANAGER"/> 

At code level one can set permission by using **https://developer.android.com/training/permissions/requesting.html** 
First check 
// Assume thisActivity is the current activity 
int permissionCheck = ContextCompat.checkSelfPermission(thisActivity, 
     Manifest.permission.group.CONTACTS); 
+0

ich habe dies versucht, aber erhalten fehler als fehler: (11) Tag attribut name hat ungültiges zeichen '-'. wegen dieser: - android.permission-Gruppe –

+0

kann Ihr Problem lösen –