1

I have integrated Aviary Photo editor in my Android App.

I am passing the tools below-

 String[] tools = new String[]{"SHARPNESS", "EFFECTS",
                "REDEYE",
                "CROP",
                "WHITEN", "DRAW", "STICKERS", "TEXT", "BLEMISH", "MEME",
                "ORIENTATION", "ENHANCE", "FRAMES", "SPLASH", "FOCUS", "BLUR",
                "VIGNETTE", "LIGHTING", "COLOR", "OVERLAYS"};
        newIntent.putExtra(Constants.EXTRA_TOOLS_LIST, tools);

But the cropping is not working.

EDIT

Cropping is Working now BUT when i get the bitmap from mMainController.getBitmap then it still returns origin bitmap (WITHOUT Cropped).

Here is my code -

@Override
public void onApplyClick() {
    // TODO Auto-generated method stub
    mMainController.onApply();
    SaveBitmap(mMainController.getBitmap());//This is returning original bimap NOT CROPPED.
}
Shoeb Siddique
  • 2,805
  • 1
  • 22
  • 42
  • Please let us know what version of Aviary/Creative SDK you are using. [Info on the latest version can be found here](https://creativesdk.adobe.com/docs/android/#/articles/gettingstarted/index.html). – Ash Ryan Arnwine Apr 18 '16 at 14:25

1 Answers1

1

For the recent versions of the Creative SDK Image Editor component (formerly Aviary), you can set the tool list using an array of ToolLoaderFactory.Tools.

Making the array

As an example:

ToolLoaderFactory.Tools[] tools = {
    ToolLoaderFactory.Tools.CROP, 
    ToolLoaderFactory.Tools.TEXT};

ToolLoaderFactory.Tools is an enum, so Android Studio will show you an auto-complete list of the available tools that you can choose from.

Configuring the Image Editor

You would then pass tools to the AdobeImageIntent.Builder using the .withToolList() method, like this:

Intent imageEditorIntent = new AdobeImageIntent.Builder(this)
    .setData(uri)
    .withToolList(tools)
    .build();

(Note that since v0.9.7 of the Creative SDK, AviaryIntent has been renamed to AdobeImageIntent.)

More info

For more info, see this blog post on the Creative SDK blog.

Ash Ryan Arnwine
  • 1,471
  • 1
  • 11
  • 27
  • Hi Ash Ryan, I am getting an issue while cropping an Image. – Shoeb Siddique May 31 '16 at 05:17
  • The edited image comes back in the `onActivityResult()` method. For a basic sample of setting this up, see [MainActivity.java](https://github.com/CreativeSDK/android-getting-started-samples/blob/master/image-editor-ui/app/src/main/java/com/adobe/imageeditorui/MainActivity.java) in [this sample GitHub repo](https://github.com/CreativeSDK/android-getting-started-samples/tree/master/image-editor-ui). – Ash Ryan Arnwine Jun 01 '16 at 19:57