ssk
ssk

Reputation: 9255

CONTACTS permission in Android without being requested

My Android app shows that is needs CONTACTS permission even though I haven't explicitly requested.

Here is the AndroidManifest:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.myapp.package"
    android:versionCode="2"
    android:versionName="1.1" >

    <uses-sdk
        android:minSdkVersion="14"
        android:targetSdkVersion="19" />

    <permission
        android:name="com.myapp.package.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <uses-permission android:name="com.myapp.package.permission.C2D_MESSAGE" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />

    <permission
        android:name="com.myapp.package.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

    <uses-permission android:name="com.myapp.package.permission.MAPS_RECEIVE" />

    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" />
<>

From build.gradle:

compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services:+'

// SwipeLayout
// https://github.com/daimajia/AndroidSwipeLayout
compile 'com.android.support:recyclerview-v7:21.0.0'
compile 'com.android.support:support-v4:20.+'
compile 'com.daimajia.swipelayout:library:1.2.0@aar'

// Crashlytics
compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
    transitive = true;

How do I find the reason for Contacts permission being added?

I checked Why does my app say I am requesting permission for Contacts? and cross-checked my play-services dependency. It didn't fix the issue.

Upvotes: 1

Views: 135

Answers (1)

ssk
ssk

Reputation: 9255

Based on suggestions from X3Btel and CommonsWare, the following changes worked:

compile 'com.android.support:support-v4:23.4.0' compile 'com.android.support:appcompat-v7:23.4.0'

// Google Analytics
compile 'com.google.android.gms:play-services-analytics:9.4.0'

// Google Drive
compile 'com.google.android.gms:play-services-drive:9.4.0'

// Google Maps
compile 'com.google.android.gms:play-services-maps:9.4.0'

// SwipeLayout
// https://github.com/daimajia/AndroidSwipeLayout
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.daimajia.swipelayout:library:1.2.0@aar'

Upvotes: 1

Related Questions