Android拍照后更新相册

方法一:

Uri updateUri = Uri.fromFile(file);
Intent updateIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, updateUri);
sendBroadcast(updateIntent);

方法二:

ContentValues localContentValues = new ContentValues();

localContentValues.put("_data", imageFile.toString());

localContentValues.put("description", "save image ---");

localContentValues.put("mime_type", "image/jpeg");

ContentResolver localContentResolver = getContentResolver();

Uri localUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;

localContentResolver.insert(localUri, localContentValues);

 

参考:http://blog.sina.com.cn/s/blog_5689926f0100udgo.html

 

Android拍照后更新相册,布布扣,bubuko.com

Android拍照后更新相册

上一篇:Android:TabHost实现Tab切换


下一篇:Android Wear 开发入门——如何创建一个手机与可穿戴设备关联的通知(Notification)