Language
Present Photo Editor using ActivityResultContract
Register Contract#
The PhotoEditorActivityResultContract
extends from ActivityResultContract
. It is used to start the photo editor and handle its result. It parses the result into EditorSDKResult
that provides a convenient API to check the status of the export.
Create SettingsList#
The PhotoEditorSettingsList
stores all the settings that are used to configure the photo editor and its tools. The configure()
method is used to configure the different ImglySettings
models inside the SettingsList
. Here, we configure the LoadSettings
to set the source to the Uri
of the photo to be loaded.
Start Editor#
The ActivityResultLauncher
obtained from registering the PhotoEditorActivityResultContract
is used to launch the photo editor with the configured PhotoEditorSettingsList
.