Comments (3)
btw response callback in this case is always called only if success
from runtimepermission.
final PermissionResult permissionResult = new PermissionResult(this, acceptedPermissions, refusedPermissions, askAgainPermissions);
if (permissionResult.isAccepted()) {
for (AcceptedCallback callback : acceptedCallbacks) {
callback.onAccepted(permissionResult);
}
for (PermissionListener permissionListener : permissionListeners) {
permissionListener.onAccepted(this, permissionResult.getAccepted());
}
}
if (permissionResult.hasDenied()) {
for (DeniedCallback callback : deniedCallbacks) {
callback.onDenied(permissionResult);
}
}
if (permissionResult.hasForeverDenied()) {
for (ForeverDeniedCallback callback : foreverDeniedCallbacks) {
callback.onForeverDenied(permissionResult);
}
}
if (permissionResult.hasForeverDenied() || permissionResult.hasDenied()) {
for (PermissionListener permissionListener : permissionListeners) {
permissionListener.onDenied(this, permissionResult.getDenied(), permissionResult.getForeverDenied());
}
}
for (ResponseCallback responseCallback : responseCallbacks) {
responseCallback.onResponse(permissionResult);
}
}
As you can see, this is definitely not the case. The response callback is always called no matter what. I wouldn't necessarily say that's counter intuitive, technically the callback is called when permissions have successfully been responded to, however, the documentation does say that it would only be called if all permissions are accepted.
from runtimepermission.
ok, fixed
from runtimepermission.
Related Issues (20)
- (java 7) It seems that onAccepted or onDenied are not called HOT 3
- Calling accepted when all permission denied with Never Ask Again HOT 2
- runtime-permission-kotlin : kotlin-stdlib-jre7 is deprecated HOT 1
- Why PermissionListener in PermissionFragment should be WeakReference? HOT 1
- The best to deal with Lint errors according to MissingPermission
- Deny doesn't work HOT 6
- Migration to AndroidX HOT 1
- never getting callback of Accept or deny blocks HOT 1
- Permissions List Parameters HOT 2
- Filed resolve dependencies HOT 1
- Cause "IllegalStateException: FragmentManager is already executing transactions" for HUAWEI BND-AL10 HOT 1
- Crash in fragment when screen rotates HOT 2
- One major issue. Deny result is sticky. New requests are automatically declined.
- Permission fragment error with kotlin androidx alpha03 HOT 2
- IllegalStateException when using with Navigation Architecture Component
- FragmentManager is already executing transactions HOT 7
- Dealing With System Permission
- Application getting unresponsive while asking for multiple permissions.
- Crashlytics show a Fatal Exception on com.github.florent37.runtimepermission.kotlin.PermissionException
- JCenter shutting down HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from runtimepermission.