I am working on an application that has a social login feature. Therefore, I created an android library project, the role of which is provided by a social login using g +, FB, etc. My application uses this android library project for social login. But now I am faced with the problem described below.
I successfully logged in using g +.
But when I try to get a subscription in a user’s email
String email = Plus.AccountApi.getAccountName(mGoogleApiClient);
I get below exception stack trace
W/System.err﹕ java.lang.SecurityException: Missing android.permission.GET_ACCOUNTS W/System.err﹕ at android.os.Parcel.readException(Parcel.java:1474) W/System.err﹕ at android.os.Parcel.readException(Parcel.java:1427) W/System.err﹕ at com.google.android.gms.plus.internal.zzd$zza$zza.getAccountName(Unknown Source)
Added uses-permission tag in my android library project. Below is the android-libray manifest file.
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="login.social"> <application > <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.USE_CREDENTIALS" /> </application> </manifest>
Can someone explain to me what happened?
source share