Closed MalcolmMcFly closed 6 years ago
did you added them into your manifest ?
2018-03-20 13:10 GMT+01:00 Malcolm McFly notifications@github.com:
I have a pretty basic Java 7 implementation. No matter what the user selects, I am always falling in the onDenied block:
Toast.makeText(this, "photo button pressed", Toast.LENGTH_SHORT).show(); askPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.READ_EXTERNAL_STORAGE) .ask(new PermissionListener() { @Override public void onAccepted(RuntimePermission runtimePermission, List<String> accepted) { Toast.makeText(DetailActivity.this, "permission accepted", Toast.LENGTH_SHORT).show(); } @Override public void onDenied(RuntimePermission runtimePermission, List<String> denied, List<String> foreverDenied) { // permission denied Timber.d("permissions denied"); Toast.makeText(DetailActivity.this, "permission denied", Toast.LENGTH_SHORT).show(); } }); }
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/florent37/RuntimePermission/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AFfQXHP0jop9YtJSCx2OcgS6dWuO78Brks5tgPGjgaJpZM4Sxxyy .
Yes I did:
...
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
...
I just made an update, can you test with 1.0.1
?
@florent37 same result. Maybe I am doing something wrong. I'm using this in an AppCompatActivity, Android 7.0
your code seems good, I try it
I'm going into onAccepted
with your code
@florent37 perhaps it is this particular device. I will try a few other devices, if that doesn't work I will create a gist.
yes thanks
2018-03-20 15:54 GMT+01:00 Malcolm McFly notifications@github.com:
@florent37 https://github.com/florent37 perhaps it is this particular device. I will try a few other devices, if that doesn't work I will create a gist.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/florent37/RuntimePermission/issues/3#issuecomment-374627445, or mute the thread https://github.com/notifications/unsubscribe-auth/AFfQXDBd0zYzjjKUNLizNo-0HRr95DFMks5tgRgKgaJpZM4Sxxyy .
can you try to uninstall & reinstall (with clear) the app, to see if you have not "never ask again"
I have a pretty basic Java 7 implementation. No matter what the user selects, I am always falling in the onDenied block: