sd卡访问android kitkat 4.4版本



我已经能够在设备上找到内部和外部sd卡的路径。一切运行良好,但仅在4.4之前的设备上运行。

当我在4.4.x设备上测试代码时,我无法访问必须从外部sd卡上传的文件。

如何解决此

首先确定要从内存中获取的文件然后像这样使用。


        Intent pictureActionIntent = new Intent(Intent.ACTION_GET_CONTENT, null);
        pictureActionIntent.setType("image/*");
        pictureActionIntent.putExtra("return-data", true);
        startActivityForResult(pictureActionIntent, 0);

最新更新