@@ -0,0 +1,1365 @@
+package com.main.qrImage;%0A%0Aimport java.io.File;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0A%0Aimport android.graphics.Bitmap;%0Aimport android.os.Environment;%0A%0Apublic class ImageManager %7B%0A%09public final static String TAG = %22ImageManager%22;%0A%09private static String DRI_NAME = Environment.getExternalStorageDirectory() + %22/QRCard/%22;%0A%09private static String FORMAT = %22png%22;%0A%09private static ImageManager instance = null; %0A%09%0A%09public static ImageManager getInstance() %7B    %0A%09%09if (instance == null) %7B    %0A%09%09    instance = new ImageManager();  %0A%09%09%7D    %0A%09%09return instance;    %0A%09%7D %0A%09%0A%09private ImageManager() %7B%0A%09%09boolean ret = false;%0A%09%09File destDir = new File(DRI_NAME);%0A%09%09if (!destDir.exists()) %7B%0A%09%09%09ret = destDir.mkdirs();%0A%09%09%7D%0A%09%7D%0A%09%0A%09public void saveImage(String name, Bitmap qrCodeBitmap)%7B%0A%09%09File file = new File(DRI_NAME + name + %22.%22 + FORMAT);%0A%09%09if (file.exists()) %7B%0A%09%09%09file.delete();%0A%09%09%7D%0A%09%09try %7B%0A%09%09%09file.createNewFile();%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09return;%0A%09%09%7D%09%0A%09%09try %7B   %0A%09%09%09FileOutputStream out = new FileOutputStream(file);%0A%09%09%09qrCodeBitmap.compress(Bitmap.CompressFormat.PNG, 90, out);%0A%09%09%09out.flush();%0A%09%09%09out.close();%0A%09%09%7D catch (FileNotFoundException e) %7B%0A%09%09%09// TODO Auto-generated catch block%0A%09%09%09e.printStackTrace();%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09// TODO Auto-generated catch block%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%7D%0A%7D%0A

save qr image