i have here a code snippet that saves a bitmap on sd card:
String filename = String.valueOf(System.currentTimeMillis()) ;
ContentValues values = new ContentV
Please try following code,
File sdCard = Environment.getExternalStorageDirectory();
File dir = new File (sdCard.getAbsolutePath());
dir.mkdirs();
File out = new File(dir,filename);
try {
out.createNewFile();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
DataOutputStream fo = null;
try {
fo = new DataOutputStream( new FileOutputStream(out));
//write what you want to fo
fo.close();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}