Overview
(This article relates to the Creative SDK for Android v0.5.3)
We are aware of an issue in the Image Editor for Android where the image output is not stored at the URI specified by the developer in the .withOutput()
method argument.
A closer look at the issue
For example, a basic Intent for the Image Editor might look like this:
Uri uri = Uri.parse("http://mysite-ftw.com/my-kinda-sweet-image.jpeg");
// AviaryIntent supports API 16 and up
if (ApiHelper.AT_LEAST_16) {
Intent imageEditorIntent = new AviaryIntent.Builder(this)
.setData(uri) // input image src
.withOutput(Uri.parse(getFilesDir() + "/my-sweet-image.jpg")) // output file
.build();
// start the activity
startActivityForResult(imageEditorIntent, 1);
}
Within that example code, the .withOutput()
call that indicates where the resulting file will be stored looks like this:
.withOutput(Uri.parse(getFilesDir() + "/my-sweet-image.jpg"))
However, this currently does not work as expected. The save at the specified location will fail, and the SDK fallback URI will be used instead.
A temporary workaround
While this is inconvenient, your photo is still saved and is accessible in the Activity result:
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == RESULT_OK) {
switch (requestCode) {
case 1: // this is the request code we used in this example
Uri mImageUri = data.getData(); // generated output file
mResultImageView.setImageURI(mImageUri); // show the image in an ImageView
Log.d("URI!", mImageUri.toString()); // Log the URI
break;
}
}
}
The Creative SDK team is looking into this issue. We apologize for the inconvenience.
Comments