I have reads many question about this, but I still failed using this code... maybe anyone can corect my code... I want to crop an image from file that i know the location us
Then start the activity, use this
startActivityForResult(intent, 1);
then use the following to get croped image
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode != RESULT_OK)return;
switch (requestCode) {
case 1:
Bundle extras = data.getExtras();
if (extras != null) {
photo = extras.getParcelable("data");
tampilan.setBitmap(photo);
break;
}
}
}