如何从文档文件路径获取Content Uri?

时间:2020-08-27 05:24:16

标签: android android-contentprovider

我可以从以下代码中获取媒体(图像和视频)内容Uri

PS> echoargs.exe 'print("hello")'
Arg 0 is <print(hello)>

Command line:
"E:\echoargs.exe"  print("hello")

PS> echoargs.exe "print('hello')"
Arg 0 is <print('hello')>

Command line:
"E:\echoargs.exe"  print('hello')

但是对于文档文件(例如文本,pdf等),我无法获取Content Uri。

注意:Uri.fromFile()不适用于内容Uri。

内容Uri示例:content:// media / external / file / 17277

0 个答案:

没有答案
相关问题