Skip to content

Commit

Permalink
Add version 2.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leontobias committed Mar 28, 2023
1 parent d08073e commit 17afa4a
Show file tree
Hide file tree
Showing 12 changed files with 65 additions and 23 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## [2.8.0]

### Added

* [video_editor_sdk] Added `VideoEditorResult.segments`, `VideoEditorResult.videoSize`, and `VideoEditorResult.release()` which enable serialization of the individual video composition components if `VideoOptions.segments` is enabled.
* [video_editor_sdk] Added `FlutterVESDK.editorWillOpenClosure` and `FlutterVESDK.editorWillExportClosure` which allow further native configuration on Android.
* [photo_editor_sdk] Added `FlutterPESDK.editorWillOpenClosure` and `FlutterPESDK.editorWillExportClosure` which allow further native configuration on Android.

### Fixed

* [imgly_sdk] Fixed `TextOptions.canvasActions` would use `StickerCanvasAction` instead of `TextCanvasAction`.

## [2.7.1]

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ In order to run any samples or use any wrapper without a watermark,
you'll have to purchase a commercial PhotoEditor SDK or VideoEditor SDK
license. Visit https://img.ly for more details.

Copyright (c) 2014-2022, img.ly GmbH
Copyright (c) 2014-2023, img.ly GmbH
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Add the plugin package to the `pubspec.yaml` file in your project:

```yaml
dependencies:
photo_editor_sdk: ^2.7.1
photo_editor_sdk: ^2.8.0
```
Install the new dependency:
Expand Down Expand Up @@ -107,13 +107,13 @@ Run with --stacktrace option to get the stack trace. Run with --info or --debug
}
dependencies {
...
+ classpath 'ly.img.android.sdk:plugin:10.4.0'
+ classpath 'ly.img.android.sdk:plugin:10.4.1'
...
}
}
```

In order to update PhotoEditor SDK for Android replace the version string `10.4.0` with a [newer release](https://github.com/imgly/pesdk-android-demo/releases).
In order to update PhotoEditor SDK for Android replace the version string `10.4.1` with a [newer release](https://github.com/imgly/pesdk-android-demo/releases).

2. Still in the `android/build.gradle` file (**not** `android/app/build.gradle`), add these lines at the bottom:

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ imglyConfig {
}
}

def MIN_LY_IMG_ANDROID_SDK_PLUGIN_VERSION = "10.4.0"
def MIN_LY_IMG_ANDROID_SDK_PLUGIN_VERSION = "10.4.1"

task checkVersion {
if (imglyConfig.convertToVersionNumber(imglyConfig.getVersion()) < imglyConfig.convertToVersionNumber(MIN_LY_IMG_ANDROID_SDK_PLUGIN_VERSION)) {
Expand Down
1 change: 1 addition & 0 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
android:exported="false"
android:enabled="false"
android:name="ly.img.android.IMGLYAutoInit" />
<activity android:name="FlutterPESDKActivity" />
</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.content.Intent
import android.net.Uri
import android.util.Log
import androidx.annotation.NonNull
import androidx.annotation.WorkerThread

import java.io.File
import org.json.JSONObject
Expand All @@ -25,6 +26,8 @@ import ly.img.android.pesdk.utils.UriHelper
import ly.img.android.sdk.config.*
import ly.img.android.pesdk.backend.encoder.Encoder
import ly.img.android.pesdk.backend.model.EditorSDKResult
import ly.img.android.pesdk.backend.model.state.manager.StateHandler
import ly.img.android.pesdk.ui.activity.PhotoEditorActivity
import ly.img.android.pesdk.utils.ThreadUtils
import ly.img.android.serializer._3.IMGLYFileWriter
import ly.img.android.serializer._3.type.FileMapper
Expand All @@ -33,15 +36,18 @@ import ly.img.android.serializer._3.type.IMGLYJsonReader
import ly.img.flutter.imgly_sdk.FlutterIMGLY
import java.util.UUID

/**
* FlutterPESDK
*
*/
/** FlutterPESDK */
class FlutterPESDK: FlutterIMGLY() {

companion object {
// This number must be unique. It is public to allow client code to change it if the same value is used elsewhere.
var EDITOR_RESULT_ID = 29065

/** A closure to modify a *PhotoEditorSettingsList* before the editor is opened. */
var editorWillOpenClosure: ((settingsList: PhotoEditorSettingsList) -> Unit)? = null

/** A closure allowing access to the *StateHandler* before the editor is exporting. */
var editorWillExportClosure: ((stateHandler: StateHandler) -> Unit)? = null
}

override fun onAttachedToEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) {
Expand Down Expand Up @@ -132,10 +138,10 @@ class FlutterPESDK: FlutterIMGLY() {
}
}

applyTheme(settingsList, configuration.theme)

editorWillOpenClosure?.invoke(settingsList)
readSerialisation(settingsList, serialization, false)
startEditor(settingsList, EDITOR_RESULT_ID)
applyTheme(settingsList, configuration.theme)
startEditor(settingsList, EDITOR_RESULT_ID, FlutterPESDKActivity::class.java)
}

/**
Expand Down Expand Up @@ -224,3 +230,13 @@ class FlutterPESDK: FlutterIMGLY() {
return false
}
}

/** A *PhotoEditorActivity* used for the native interfaces. */
class FlutterPESDKActivity: PhotoEditorActivity() {
@WorkerThread
override fun onExportStart(stateHandler: StateHandler) {
FlutterPESDK.editorWillExportClosure?.invoke(stateHandler)

super.onExportStart(stateHandler)
}
}
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext.kotlin_version = '1.5.32'
ext.pesdk_version = '10.4.0'
ext.pesdk_version = '10.4.1'

repositories {
google()
Expand Down
14 changes: 7 additions & 7 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
PODS:
- Flutter (1.0.0)
- imgly_sdk (2.7.1):
- imgly_sdk (2.8.0):
- Flutter
- imglyKit (~> 11.3)
- imglyKit (11.3.3)
- photo_editor_sdk (2.7.1):
- imglyKit (11.5.1)
- photo_editor_sdk (2.8.0):
- Flutter
- imgly_sdk (= 2.7.1)
- imgly_sdk (= 2.8.0)

DEPENDENCIES:
- Flutter (from `Flutter`)
Expand All @@ -27,9 +27,9 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
imgly_sdk: e80792e7f6cc62a47d621e11c49f35182f8c2354
imglyKit: 5dba5e59e819f4dd1cb65e1591102459c41d006b
photo_editor_sdk: 35ba041a579abed60e0c1c10a249c632e6a544cb
imgly_sdk: 35dd26c1125c92f628f3464075ad4c24fcdbce26
imglyKit: b1b3b827799a50b090433ca7c61f90b078944898
photo_editor_sdk: 56f45df6fa056f801b1bafe061d06e640ebd1274

PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3

Expand Down
4 changes: 3 additions & 1 deletion example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -199,6 +199,7 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -252,6 +253,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,7 @@
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
9 changes: 9 additions & 0 deletions ios/Classes/FlutterPESDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public class FlutterPESDK: FlutterIMGLY, FlutterPlugin, PhotoEditViewControllerD
guard let license = arguments["license"] as? String else { return }
self.result = result
self.unlockWithLicense(with: license)
} else {
result(FlutterMethodNotImplemented)
}
}

Expand Down Expand Up @@ -126,6 +128,13 @@ public class FlutterPESDK: FlutterIMGLY, FlutterPlugin, PhotoEditViewControllerD
}
}

// MARK: - Helpers

/// Handles an occuring error and closes the editor.
/// - Parameter photoEditViewController: The `PhotoEditViewController` that caused the error.
/// - Parameter code: The error code.
/// - Parameter message: The error message.
/// - Parameter details: The error details.
private func handleError(_ photoEditViewController: PhotoEditViewController, code: String, message: String?, details: Any?) {
self.dismiss(mediaEditViewController: photoEditViewController, animated: true) {
self.result?(FlutterError(code: code, message: message, details: details))
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: photo_editor_sdk
description: The official Flutter plugin for PhotoEditor SDK. Integrate the photo editor into your own iOS or Android app - in minutes!
version: 2.7.1
version: 2.8.0
homepage: https://www.photoeditorsdk.com
repository: https://github.com/imgly/pesdk-flutter

Expand All @@ -11,7 +11,7 @@ environment:
dependencies:
flutter:
sdk: flutter
imgly_sdk: 2.7.1
imgly_sdk: 2.8.0

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 17afa4a

Please sign in to comment.