android.permission.GET_ACCOUNTS and privacy policy

2

I have updated the apk of one of my app and I got the message from

  

Your APK requests the following permissions: android.permission.GET_ACCOUNTS . Applications that use these permissions in an APK must have a privacy policy set.

But I do not have that permission in my app, in the manifest these are the permissions I have:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />

I do not understand why he tells me that, I have searched for the GET_ACCOUNTS permission throughout my app and he is not, and I have never added it. Does anyone know why I get that?

    
asked by Hugo AE 07.12.2016 в 17:51
source

3 answers

1

I found the solution: The problem is in using com.google.android.gms: play-services: 8.1.0 Using the GET_ACCOUNTS permission

    
answered by 16.12.2016 / 21:19
source
0

Starting with Android 6.0 API 23 the permissions are given the execution time, check the following link:

How to request permissions at runtime

    
answered by 07.12.2016 в 17:58
0

From Android 6.0 API 23 this is one of the permissions that you need to request at runtime.

The reason is that it is defined as a "risky" type of permission:

  

Why is it being required? Good because you probably use a library that requires it as GCM (previous versions).

To require permissions:

Require permissions on Android 6.0 or later.

This would be the way to require permissions to get contact information in Android 6.0:

 int permissionCheck = ContextCompat.checkSelfPermission(
            this, Manifest.permission.GET_ACCOUNTS);
    if (permissionCheck != PackageManager.PERMISSION_GRANTED) {
        Log.i("Mensaje", "No se tiene permiso para obtener información de contactos.");
            ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.GET_ACCOUNTS}, 225);
    } else {
        Log.i("Mensaje", "Se tiene permiso!");
    }
    
answered by 07.12.2016 в 17:55