Im making an app that takes a photo from camera intent and places it to the activity, I followed the example on google developers.
The problem is when I launch the camera intent if I change camera orientation, one time I save the photo it returns a "Unable to resume Activity" or "Unable to Start activity component info"
I followed the camera example on android developers, but it only shows how to prevent lost the image one time placed in the activity and change the orientation.
I tried add the following with no luck
@Override
protected void onSaveInstanceState(Bundle outState){
outState.putParcelable(URI_SAVED, selectedImageUri);
super.onSaveInstanceState(outState);
}
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState){
super.onRestoreInstanceState(savedInstanceState);
Uri new_uri = savedInstanceState.getParcelable(URI_SAVED);
selectedImagePath = getPath(new_uri).toString();
Img.setImageURI(new_uri);
}
You know where I can fnd a good working example of this ? thx