I am having a imageView in one class and on clicking the imageView a dialog box appear which has two option to take a image from camera or open the image gallery of device.
I'm going to show you the best way okay.
1st) Get and send the image URI
Uri imageUri = data.getData();
Intent newIntent = new Intent(Class.this, Class.class);
newIntent.putExtra(IMAGE_URI_KEY, imageUri);
startActivity(newIntent);
2nd) Receive the image and how to show it
receivedImageUri = getIntent().getParcelableExtra(IMAGE_URI_KEY);
imageView.setImageURI(receivedImageUri);