Search code examples
angularionic-frameworkapk

GET_ACCOUNTS permission error with APK upload to Google Play Store


I have built a project with Ionic & I cannot upload my APK to the Google Play store. I get the following error:

Your APK is using permissions that require a privacy policy: (android.permission.GET_ACCOUNTS)

I can see this permission in my AndroidManifest.xml file as shown below. I am using Firebase with their database API, AngularFire2. Do I need to create a Privacy Policy for this? Is this easy to do?:

<?xml version='1.0' encoding='utf-8'?> <manifest android:hardwareAccelerated="true" android:versionCode="2" android:versionName="0.0.2" package="io.ionic.habit" xmlns:android="http://schemas.android.com/apk/res/android"> <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /> <uses-permission android:name="android.permission.INTERNET" /> <application android:hardwareAccelerated="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:supportsRtl="true"> <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize"> <intent-filter android:label="@string/launcher_name"> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="de.appplant.cordova.emailcomposer.Provider"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/emailcomposer_provider_paths" /> </provider> <receiver android:enabled="true" android:name="com.google.android.gms.analytics.AnalyticsReceiver"> <intent-filter> <action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" /> </intent-filter> </receiver> <service android:enabled="true" android:exported="false" android:name="com.google.android.gms.analytics.AnalyticsService" /> <receiver android:enabled="true" android:exported="true" android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"> <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" /> </intent-filter> </receiver> <service android:enabled="true" android:exported="false" android:name="com.google.android.gms.analytics.CampaignTrackingService" /> </application> <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> </manifest>


Solution

  • just add privacy policy url to your application in playstore and it will solve the problem you can generate privacy policy with below urls

    https://gist.github.com/alphamu/c42f6c3fce530ca5e804e672fed70d78

    https://app-privacy-policy-generator.firebaseapp.com/