I have been trying to create an android app with the integration of Adobe creative SDJ but I have encountered some problems.
I have created an Activity where one launches camera or gallery to select an image for editing it. The camera launches and the photo is captured and saved in this path:
storage/emulated/0/Pictures/myAppName/myImage.jpg
It is also supposed to be displayed in an ImageView
in the same activity but it isn't being displayed. In another activity, I have integrated the ImageEditing UI of the creative sdk from Adobe which needs an imageUri
as an input image.
Here are my codes for displaying Image in the ImageView
:
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// camera codes
String path = "storage/emulated/0/Pictures/Touch/touch.jpg";
resultImageView.setImageDrawable(Drawable.createFromPath(path));
// gallery codes
if (resultCode == RESULT_OK && requestCode == PICK_IMAGE){
imageUri = data.getData();
resultImageView.setImageURI(imageUri);
}
}
How can I convert the ImageView
into Uri and send it to the next activity? Thanks in advance!