8
我需要获取存储在SD卡上的图像的URI。如何获取存储在SD卡上的图像的Uri?
当我想存储在绘制一个图像的URI,我用这个和它的作品完美:
i.putExtra(Intent.EXTRA_STREAM, Uri.parse("android.resource://" + getPackageName() + "/" + R.drawable.image));
但是,如果我想获得存储在SD卡一个图像的URI,我tryed这一点,它不工作,什么是错的:
i.putExtra(Intent.EXTRA_STREAM, Uri.parse("/mnt/sdcard/car.jpg"));
请,可有人告诉我怎么去存储在SD卡一个图像的正确的URI?
感谢
你试过i.putExtra(Intent.EXTRA_STREAM,Uri.parse( “文件://mnt/sdcard/car.jpg”));?让我知道发生了什么.. – user370305
看看这里 http://stackoverflow.com/questions/3873496/how-to-get-image-path-from-images-stored-on-sd-card –