-
- All Implemented Interfaces:
-
com.karumi.dexter.listener.single.PermissionListener
public class CompositePermissionListener implements PermissionListener
Listener that composes multiple listeners into one All inner listeners will be called for a given event unless one of them throws an exception or is blocked
-
-
Constructor Summary
Constructors Constructor Description CompositePermissionListener(Array<PermissionListener> listeners)Creates a CompositePermissionListener containing all the provided listeners.This constructor does not guaranty any calling order on inner listeners. CompositePermissionListener(Collection<PermissionListener> listeners)Creates a CompositePermissionListener containing all the provided listeners.This constructor will guaranty that inner listeners are called following the iterator orderof the collection.
-
Method Summary
Modifier and Type Method Description voidonPermissionGranted(PermissionGrantedResponse response)Method called whenever a requested permission has been granted voidonPermissionDenied(PermissionDeniedResponse response)Method called whenever a requested permission has been denied voidonPermissionRationaleShouldBeShown(PermissionRequest permission, PermissionToken token)Method called whenever Android asks the application to inform the user of the need for therequested permission. -
-
Constructor Detail
-
CompositePermissionListener
CompositePermissionListener(Array<PermissionListener> listeners)
Creates a CompositePermissionListener containing all the provided listeners.This constructor does not guaranty any calling order on inner listeners.
-
CompositePermissionListener
CompositePermissionListener(Collection<PermissionListener> listeners)
Creates a CompositePermissionListener containing all the provided listeners.This constructor will guaranty that inner listeners are called following the iterator orderof the collection.
-
-
Method Detail
-
onPermissionGranted
void onPermissionGranted(PermissionGrantedResponse response)
Method called whenever a requested permission has been granted
- Parameters:
response- A response object that contains the permission that has been requested andany additional flags relevant to this response
-
onPermissionDenied
void onPermissionDenied(PermissionDeniedResponse response)
Method called whenever a requested permission has been denied
- Parameters:
response- A response object that contains the permission that has been requested andany additional flags relevant to this response
-
onPermissionRationaleShouldBeShown
void onPermissionRationaleShouldBeShown(PermissionRequest permission, PermissionToken token)
Method called whenever Android asks the application to inform the user of the need for therequested permission. The request process won't continue until the token is properly used
- Parameters:
permission- The permission that has been requestedtoken- Token used to continue or cancel the permission request process.
-
-
-
-