private void storeinsd (Bitmap bitmap1) {
File = new file (File_dir);
if (!file.exists ()) {
File.mkdir ();
}
File ImageFile = new file (file, fileutils.getfilename () + ". png");
try {
Imagefile.createnewfile ();
FileOutputStream fos = new FileOutputStream (imagefile);
Bitmap1.compress (compressformat.png, FOS);
Toast.maketext (mainactivity.this, save success!) ", 1);
Fos.flush ();
Fos.close ();
} catch (FileNotFoundException e) {
E.printstacktrace ();
Toast.maketext (Mainactivity.this, save failed!) ", 1);
} catch (IOException e) {
//TODO auto-generated catch block
E.printstacktrace ();
Toast.maketext (Mainactivity.this, save failed!) ", 1);
}
}
public static String Getcharacterandnumber () {
String rel= "";
SimpleDateFormat formatter = new SimpleDateFormat ("Yyyymmddhhmmss");
Date curdate = new Date (System.currenttimemillis ());
rel = Formatter.format (curdate);
return rel;
}
public static String GetFileName () {
Mu
String filenamerandom = Getcharacterandnumber (8);
String filenamerandom = Getcharacterandnumber ();
return filenamerandom;
}