How to request permission to access sdcard on Android 6+?

Asked

Viewed 100 times

3

I have an app that accesses sdcard, everything was working perfectly, but I noticed that Android 6 has a permissions system where the user has to accept the permission not when the application is downloaded and yes when it runs!

The problem is that my app error when it tries to access the sdcard on users with Android 6, because it has no permission, even with the manifeste ok... It is only possible to access if the user opens the App details, goes on permissions and accepts the sdcard read and write permissions.

I noticed that many apps when they run something that needs permission, show a standard dialog for the user to "accept or deny X permission", how to do this? And how can we not accept that the user refuses this permission? Because she is practically the soul of the app, we can’t use the app without her

  • Take a look at this link http://ricardolecheta.com.br/? p=560. <br>He is explaining very easy.

  • The official android page also has a great tutorial on how to use the new format http://developer.android.com/training/permissions/requesting.html

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.