0
要做到這一點,我用下面的代碼,但它拋出ActivityNotFoundException ...如何使用默認圖庫應用程序查看存儲在可繪製文件夾中的圖像?
String uriStr = "android.resource://"+ "com.soft.usegallery"+ "/" + R.drawable.icon;
Uri uri = Uri.parse(uriStr);
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(uri, "image/*");
startActivity(intent);