android-6.0-marshmallowandroid-permissionsandroid-6.0.1-marshmallow

App installation on Android 6 bypasses the customary 'Permissions' screen


Wanna make an app? - That's simple!

Wanna make it work on different versions? - Learn rocket science.

Have seen the following answers and more, but none helped:

So, here's my AndroidManifest chunk:

    :    
    :    
    :    
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="23"/>

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_PROFILE"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    :    
    :    

and the relevant chunk from build.gradle:

    :    
    :    
android{

compileSdkVersion 23
buildToolsVersion "23.0.2"
    :    
    :    

When I first installed the app on Marshmallow (6.0.1), the installer said (something very similar to) - "it requires no special access (or permissions)". The app failed to go beyond the splash screen too, whereas on other Android versions, the sailing is smooth and complete.

The answers listed above explain why, (change in the permission model etc.), from which I cannot figure out what really to do.

My requests are:

Many thanks in advance!


Solution

  • Welcome to Marshmallow. Android M(6.0) introduced runtime permission model. You are suppose to handle requesting for permissions in runtime. You could refer to my github sample on how to do it. There are a few other libraries like easypermissions to enable developer get rid of the hassles.