It's easy to achieve this is to just use an Intent like this: (I put the method in a custom class that takes in an Activity as a parameter so it can be called from any Fragment or Activity)
public class UIutils {
private Activity mActivity;
public UIutils(Activity activity){
mActivity = activity;
}
public void showPhoto(Uri photoUri){
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(photoUri, "image/*");
mActivity.startActivity(intent);
}
}
Then to use it just do this:
imageView.setOnClickListener(v1 -> new UIutils(getActivity()).showPhoto(Uri.parse(imageURI)));
I use this with an Image URL but it can be used with stored files as well. If you are accessing images form the phones memory you should use a content provider.