EmbeddedPhotoPickerView.EmbeddedPhotoPickerStateChangeListener


public interface EmbeddedPhotoPickerView.EmbeddedPhotoPickerStateChangeListener


A state change listener which supplies callbacks for state changes related to any currently running Embedded PhotoPicker session.

Summary

Public methods

abstract void

Reports that the user is done with their selection and should collapse the picker.

abstract void

Reports that terminal error has occurred in the session.

abstract void

Reports that session of app with photopicker was established successfully.

abstract void

Reports that URI permission has been granted to the item selected by the user.

abstract void

Reports that URI permission has been revoked of the item deselected by the user.

Public methods

onSelectionComplete

Added in 1.0.0-alpha01
abstract void onSelectionComplete()

Reports that the user is done with their selection and should collapse the picker.

This doesn't necessarily mean that the session should be closed, but rather the user has indicated that they are done selecting images and should go back to the app.

onSessionError

Added in 1.0.0-alpha01
abstract void onSessionError(@NonNull Throwable throwable)

Reports that terminal error has occurred in the session. Any further events notified on this session will be ignored. The embedded photopicker view will be torn down along with session upon error.

onSessionOpened

Added in 1.0.0-alpha01
abstract void onSessionOpened(@NonNull EmbeddedPhotoPickerSession newSession)

Reports that session of app with photopicker was established successfully. Also shares EmbeddedPhotoPickerSession handle containing the view with the caller that should be used to notify the session of UI events.

onUriPermissionGranted

abstract void onUriPermissionGranted(@NonNull List<@NonNull Uri> uris)

Reports that URI permission has been granted to the item selected by the user.

It is possible that the permission to the URI was revoked if the item was unselected by user before the URI is actually accessed by the caller. Hence callers must handle SecurityException when attempting to read or use the URI in response to this callback.

onUriPermissionRevoked

abstract void onUriPermissionRevoked(@NonNull List<@NonNull Uri> uris)

Reports that URI permission has been revoked of the item deselected by the user.