android - User gets permissions request that are not included in the manifest -


i have released app has 2 permission in manifest file (to show banner ads). "android.permission.internet" , "android.permission.access_network_state". testing tried install app play market , discovered app required identity, location, photo/media/files!! there no such permissions in manifest file, , don't need them. tried other apps similar manifest.xml (internet, network state) installing without special permissions. considering new content rating certificate system, might have problems because in questionnaire marked don't need user location. why requires permissions didn't ask? i'm using android studio , build.gradle:

 android {     compilesdkversion 22     buildtoolsversion "22.0.1"      defaultconfig {         applicationid "com.appname"         minsdkversion 15         targetsdkversion 22         versioncode 1         versionname "1.0"     }     buildtypes {         release {             minifyenabled true             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'         }     } }  repositories {     maven {         url "https://jitpack.io"     } }  dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     compile 'com.github.philjay:mpandroidchart:v2.1.0'     compile 'com.melnykov:floatingactionbutton:1.3.0'     compile 'com.mcxiaoke.volley:library:1.0.+'     compile 'com.nispok:snackbar:2.10.2'     compile 'com.android.support:cardview-v7:22.2.0'     compile 'com.android.support:recyclerview-v7:22.2.0'     compile 'uk.co.chrisjenx:calligraphy:2.1.0'     compile 'com.google.android.gms:play-services:7.5.0'     compile 'com.android.support:appcompat-v7:22.2.0'     compile 'com.github.markushi:android-ui:1.2'     compile 'com.afollestad:material-dialogs:0.7.3.1' } 

manifest.xml

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"           xmlns:tools="http://schemas.android.com/tools"           package="com.apppackage" >      <uses-permission android:name="android.permission.internet" />     <uses-permission android:name="android.permission.access_network_state" />      <application         android:name=".myapplication"         android:allowbackup="true"         android:icon="@mipmap/ic_launcher"         android:label="@string/app_name"         android:theme="@style/apptheme"         >         <activity             android:name=".mainactivity"              android:label="@string/app_name" >             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.launcher" />             </intent-filter>         </activity>         <activity             android:name="com.google.android.gms.ads.adactivity"             android:configchanges="keyboard|keyboardhidden|orientation|screenlayout|uimode|screensize|smallestscreensize" />          <meta-data             android:name="com.google.android.gms.version"             android:value="@integer/google_play_services_version" />          <activity android:name=".prefs_activity" >         </activity>         <activity             android:name=".guide_activity"             android:label="@string/title_activity_" >         </activity>         <activity             android:name=".picker_activity"             android:label="@string/title_activity_" >         </activity>     </application>  </manifest> 

update:

thanks commonsware's answer have found "manifest-merger-release-report.txt", , uses these permissions. these maps , wallet apis. have separated play service this:

    compile 'com.google.android.gms:play-services:7.5.0' 

to this(all need now):

    compile 'com.google.android.gms:play-services-analytics:7.5.0'     compile 'com.google.android.gms:play-services-plus:7.5.0'     compile 'com.google.android.gms:play-services-ads:7.5.0'     compile 'com.google.android.gms:play-services-appindexing:7.5.0' 

results:

  • removed unnecessary permissions
  • apk size reduced 500kb
  • started take api separation

play market apk update screenshot

why requires permissions didn't ask?

because loading in 11 libraries, , 1 or more of them asking these permissions. in particular, loading in com.google.android.gms:play-services, , require lot of permissions. example, play services has fused location api , google maps, both of need location data.

a manifest merger report should written build/outputs/apk/ of project or module (e.g., in app/ in traditional android studio project). can use try determine additional permissions coming from. then, stop using libraries, or switch else. in case of play services, rather loading in all of play services, load in pieces need. covered in the documentation (see "selectively compiling apis executable" section).


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -