-1
Add this to your import:
import android.annotation.TargetApi;
String[] perms = {"android.permission.WRITE_EXTERNAL_STORAGE"};
ActivityCompat.requestPermissions(MainActivity.this,perms,permsRequestCode);
and enough.
-1
1
Add this to your import:
import android.annotation.TargetApi;
String[] perms = {"android.permission.WRITE_EXTERNAL_STORAGE"};
ActivityCompat.requestPermissions(MainActivity.this,perms,permsRequestCode);
and enough.
Browser other questions tagged android android-permission
You are not signed in. Login or sign up in order to post.
the way to grant permissions were all changed in the "M" (23) version of android, see here a good tutorial on the subject: Runtime Permissions System, Android M
– Armando Marques Sobrinho
still catching up with these editions of stackoverflow, ririri
– Armando Marques Sobrinho