I built my own camera so it could be launched from inside my other android app, i want to save the images inside this app and not in the default gallery, i was using getExternalFilesDir() because i wanna keep the data just inside my app. But it is not working quite right, does anybody know what i have to change?? I do have the permission in my manifest. My phone is an HTC phone
private void dispatchTakePictureIntent(int actionCode) {
imageURI = getExternalFilesDir(null) + File.separator
+ System.currentTimeMillis() + ".jpg";
File mFile = new File(getFilesDir(), "newImage.jpg");
if(!mFile.exists()) {
try{
mFile.createNewFile();
} catch (Exception e){
return;
}
}
//Uri iURI = Uri.parse(imageURI);
Log.v("camera", mFile.toString()); // Debugging statement
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(mFile));
startActivityForResult(takePictureIntent, actionCode);
}
Here is the code that i am using to do it.