In my app a capture button is there to capture an image using device camera,so I have used a method captureImage() on the click event of that button.When I click the button
getOutputMediaFile(type) returns null.
public Uri getOutputMediaFileUri(int type) {
return Uri.fromFile(getOutputMediaFile(type));
}
You are returning here:
// Create the storage directory if it does not exist
if (!mediaStorageDir.exists()) {
if (!mediaStorageDir.mkdirs()) {
Log.d(TAG, "Oops! Failed create "
+ Config.IMAGE_DIRECTORY_NAME + " directory");
return null;
}
}
Have you added the following permission
to your manifest?