Coder Social home page Coder Social logo

viraj99 / pesdk-cordova Goto Github PK

View Code? Open in Web Editor NEW

This project forked from imgly/pesdk-cordova

0.0 0.0 0.0 227 KB

Cordova & Ionic plugin for PhotoEditor SDK

Home Page: https://www.photoeditorsdk.com

License: Other

JavaScript 16.87% Kotlin 8.12% Objective-C 22.09% TypeScript 52.92%

pesdk-cordova's Introduction

PhotoEditor SDK Logo

NPM version Platform support Twitter

Cordova & Ionic plugin for PhotoEditor SDK

Getting started

Add PhotoEditor SDK plugin to your project as follows:

cordova plugin add cordova-plugin-photoeditorsdk

Android

From version 3.0.0 the plugin uses AndroidX. To enable AndroidX in your application please adjust your config.xml:

<platform name="android">
...
+    <preference name="AndroidXEnabled" value="true" />
...
</platform>

If your application is using legacy Android Support Libraries you can use the cordova-plugin-androidx-adapter which will migrate the legacy libraries to work with AndroidX.

Module Configuration

You can configure the modules used for the PhotoEditor SDK for Android by opening imglyConfig.gradle and removing / commenting out the modules you do not need. This will also reduce the size of your application.

Because PhotoEditor SDK for Android with all its modules is quite large, there is a high chance that you will need to enable Multidex for your project as follows:

cordova plugin add cordova-plugin-enable-multidex

Usage

Each platform requires a separate license file. Unlock PhotoEditor SDK with a single line of code for both platforms via platform-specific file extensions.

Rename your license files:

  • Android license: ANY_NAME.android
  • iOS license: ANY_NAME.ios

Pass the file path without the extension to the unlockWithLicense function to unlock both iOS and Android:

PESDK.unlockWithLicense('www/assets/ANY_NAME');

Open the editor with an image:

PESDK.openEditor(
  successCallback,
  failureCallback,
  PESDK.resolveStaticResource('www/assets/image.jpg')
);

Please see the code documentation for more details and additional customization and configuration options.

Notes for Ionic framework

  • Add this line above your class to be able to use PESDK.
    declare var PESDK;
  • Ionic will generate a www folder that will contain your compiled code and your assets. In order to pass resources to PhotoEditor SDK you need to use this folder.

Example

Please see our example project which demonstrates how to use the Cordova plugin for PhotoEditor SDK.

License Terms

Make sure you have a commercial license for PhotoEditor SDK before releasing your app. A commercial license is required for any app or service that has any form of monetization: This includes free apps with in-app purchases or ad supported applications. Please contact us if you want to purchase the commercial license.

Support and License

Use our service desk for bug reports or support requests. To request a commercial license, please use the license request form on our website.

pesdk-cordova's People

Contributors

hasanmhdamin avatar leonpesdk avatar sascha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.