Here is my code :
String folderPath = "/sdcard/BarcodePicture/";
File file = new File(folderPath + "image_" + UniqueID + ".jpg");
Uri outputFileUri = Uri.fromFile(file);
i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
i.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
startActivityForResult(i, cameraData);
This code works on my Sony device but on Hisense device, when I selected “OK” on prompt, it do nothing. There is no prompt on Sony device.
I think the error come from i.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);, when I commented it, it works, but what I want is that image captured to be saved on SDCard folder.
Thanks in advance for the help.
Take a look at this answer: https://stackoverflow.com/a/8074193/1454719
Sdcard in my smasung device is /mnt/sdcard 🙂