Converting file:// scheme to content:// scheme

后端 未结 3 936
孤独总比滥情好
孤独总比滥情好 2021-01-03 00:07

I am running to the problem with using Droid X\'s Files app and Astro file manager to select an image file. This two apps return the selected image with the scheme \"file://

3条回答
  •  孤独总比滥情好
    2021-01-03 01:02

    Use ContentResolver.openInputStream() or related methods to access the byte stream. You shouldn't generally be worrying about whether it is a file: or content: URI.

    http://developer.android.com/reference/android/content/ContentResolver.html#openInputStream(android.net.Uri)

提交回复
热议问题