Language
From Remote URL
Download the photo file#
Although you can pass a URL directly to the editor, we strongly recommend that you manage to download the remote resource yourself. This allows you more control over where and how the download task is being executed and avoids potential problems around UI locking.
Here, we download a photo from a remote URL using coroutines and save it in a local file. While the download is running, we show a loader and dismiss it when the download is finished.
Start Editor#
Configure the LoadSettings
to set the source to the Uri
of the file. The PhotoEditorBuilder
takes in the configured PhotoEditorSettingsList
and starts the photo editor. The result is obtained in the onActivityResult()
method when the editor exits.