I have an android application which contains multiple activities.
In one of them I\'m using a button which will call the device camera :
public void
To Access the Camera and take pictures and set ImageView on Android
You have to use Uri file = Uri.fromFile(getOutputMediaFile()); for marshmallow.
Uri file = Uri.fromFile(getOutputMediaFile());
Use below link to get path
https://androidkennel.org/android-camera-access-tutorial/