Looking for
We've rebranded!
API Docs

Migration from v7

1. Update the Plugin to v8

There are no compatibility changes on the Gradle Plugin itself. Simply update the version.

// Add the PESDK repository and plugin dependency
buildscript {
    repositories {
        maven { url 'https://artifactory.img.ly/artifactory/imgly' }
    dependencies {
        // Insert the latest SDK version number here. You will find it here https://github.com/imgly/pesdk-android-demo/releases
        classpath 'ly.img.android.pesdk:plugin:8.1.2'

2. Update the Kotlin version

Make sure you are using the Kotlin version 1.4.10 or higher.

3. Update your App for scoped storage.

Version 8 is now scoped storage compatible. See Storage updates in Android 11 for more details.

You can and should remove the requestLegacyExternalStorage attribute from your AndroidManifest.xml. Make sure, that the rest of your app is ScopedStorage compatible before you remove the flag.

4. Do not mix up SaveSettings

Use VideoEditorSaveSettings to specify all your export settings and the export destination. SaveSettings are now an abstract class, you can use them to set the destination path of PhotoEditorSDK and VideoEditorSDK.

NOTE: Do not mix up PhotoEditorSaveSettings and VideoEditorSaveSettings in the same SettingsList, this is not supported!

5. Choose the destination for your export.

We have to break the API of VideoEditorSaveSettings, we removed the methods setOutputFilePath, setExportDir and setExportPrefix.

Since v8 use can use one of the following 3 options to save your export.

  1. Option: VideoEditorSaveSettings.setOutputToTemp() In this case the result is saved into a temporary file. The Editor does not need any permission to write the file. You have to move or remove this file after you are done with it, otherwise, you will waste Storage space.

  2. Option: VideoEditorSaveSettings.setOutputToUri(outputUri: Uri) In this case the result is saved into your file- or content-uri. The Editor will NOT ask for any write permission! You have to make sure that you have the right to write to this Uri. If not the user can not export!

  3. Option: VideoEditorSaveSettings.setOutputToGallery(relativePath: String, name:String) In this case the result is saved into to devices gallery. The editor will ask for write permission before starting the exporting. You can prevent that by asking the user for this permission before starting the Editor. The name of the file can have SimpleDateFormat patterns like img_<yyyy_MM_dd_HH_mm_ss> the angled brackets are replaced with the result of SimpleDateFormat("yyyy_MM_dd_HH_mm_ss", Locale.US).format(Date()) The default locale is Locale.US you can change it to the device locale by set the static variable AbstractSaveSettings.locale = Locale.getDefault(). See SimpleDateFormat for more details.

6. We removed VideoEditorSaveSettings.setSavePolicy.

Use VideoEditorSaveSettings.setOutputMode instead.

There are only 3 options now.

  1. Option: OutputMode.EXPORT_ALWAYS, the editor always starts the export. This is useful when you want to make sure your output format is being followed.

  2. Option: OutputMode.EXPORT_IF_NECESSARY, the editor only starts the export if changes have been made to the input. Your export settings may not be taken into account in this case.

  3. Option: OutputMode.EXPORT_ONLY_SETTINGS_LIST, the editor will never export. This is useful, for example, if you only want to save a serialization.

7. We changed the parameter type of VideoEditorSaveSettings.setExportFormat

Use the enum VideoExportFormat as input parameter instead.

8. Some of the SaveSettings functionality is now in EditorSaveState.

  • SaveSettings.saveResult is now EditorSaveState.saveResult
  • SaveSettings.Events.EXPORT_START is now EditorSaveState.Events.EXPORT_START
  • SaveSettings.Events.EXPORT_DONE is now EditorSaveState.Events.EXPORT_DONE
  • SaveSettings.Events.EXPORT_START_IN_BACKGROUND is now EditorSaveState.Events.EXPORT_START_IN_BACKGROUND

9. Internal Kotlin converting of some classes

We have converted some of our classes into Kotlin. The signature should be the same in Java. But it can result in Kotlin syntax changes on your side like:

  1. Changed Nullable and Nonnull types.
  2. Changed variable/getter/setter access.