I\'m trying to pass a URI-Object to my Intent in order to use that URI in another activity...
How do I pass a URI ?
private Uri imageUri;
....
Intent
The Uri.parse(extras.getString("imageUri")) was causing an error:
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Intent android.content.Intent.putExtra(java.lang.String, android.os.Parcelable)' on a null object reference
So I changed to the following:
intent.putExtra("imageUri", imageUri)
and
Uri uri = (Uri) getIntent().get("imageUri");
This solved the problem.