This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PESDK = { | |
present: function(success, failure, options) { | |
cordova.exec(success, failure, "PESDK", "present", [options]); | |
} | |
}; | |
module.exports = PESDK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Runnable present(final Activity mainActivity, final String filepath, final CallbackContext callbackContext) { | |
callback = callbackContext; | |
final PESDKPlugin self = this; | |
return new Runnable() { | |
public void run() { | |
if (mainActivity != null) { | |
SettingsList settingsList = new SettingsList(); | |
settingsList | |
.getSettingsModel(EditorLoadSettings.class) | |
.setImageSourcePath(filepath.replace("file://", ""), true) // Load with delete protection true! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)present:(CDVInvokedUrlCommand *)command { | |
if (self.lastCommand == nil) { | |
self.lastCommand = command; | |
PESDKConfiguration *configuration = [[PESDKConfiguration alloc] initWithBuilder:^(PESDKConfigurationBuilder * _Nonnull builder) { | |
// Customize the SDK to match your requirements: | |
// ...eg.: | |
// [builder setBackgroundColor:[UIColor whiteColor]]; | |
}]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:rim="http://www.blackberry.com/ns/widgets" | |
id="cordova-plugin-pesdk" version="1.1.0"> | |
<name>PESDK</name> | |
<description>PhotoEditor SDK Cordova Plugin</description> | |
<license>Apache 2.0</license> | |
<keywords>cordova,camera</keywords> | |
<repo>https://github.com/imgly/pesdk-cordova-demo.git</repo> |
NewerOlder