今天介绍一下在Android中怎么插入图片到媒体库,下面看代码:
final String titleName =Function.md5(imageUri.toLowerCase())
+".png";
OutputStreamfOut = null;
try{
Filefile = new File(MainApp.cacheDir, titleName);
if(!file.exists()) {
fOut= new FileOutputStream(file);
loadedImage.compress(Bitmap.CompressFormat.JPEG,100,
fOut);
fOut.flush();
fOut.close();
<