摘要: 一、调用系统相册App,浏览所用图片 Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent.setType("image/*"); startActivity(intent);二、调用系统相册,并从中选择一张照片 Intent intent = new Intent(); intent.setAction(Intent.ACTION_GET_CONTENT); intent.setType("image/*"... 阅读全文
posted @ 2012-09-25 15:36 Binary-Stream 阅读(5879) 评论(2) 推荐(0) 编辑
摘要: 需求场景:当程序操作sd卡,比如在sd卡中存图,此时这张图在图库中无显示。解决方式:调用刷新媒体库代码。具体代码: Uri data = Uri.parse("file://" + WORKSPACE + strFileName + ".jpg"); sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, data));更新(2013-09-04): 媒体库更新全扫描代码: sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, U 阅读全文
posted @ 2012-09-25 14:44 Binary-Stream 阅读(1210) 评论(0) 推荐(0) 编辑