I am working on a project where I need to save images and videos in application internal memory only (not in SDCard or device Gallery). I am using below code. But this also save the image/video to device gallery. Please advice.
Bitmap bm;
View v=imageview;
v.setDrawingCacheEnabled(true);
bm=Bitmap.createBitmap(v.getDrawingCache());
v.setDrawingCacheEnabled(false);
String fileName="image.png";
try
{
FileOutputStream fOut=openFileOutput(fileName, MODE_PRIVATE);
bm.compress(Bitmap.CompressFormat.PNG, 100, fOut);
}
catch (Exception e)
{
e.printStackTrace();
}
I want to make the image and video private and secured. So I want to save them in apps internal memory. So no other app can access it. Please suggest.