【发布时间】:2017-09-13 10:19:16
【问题描述】:
我想获取 pdf、txt 等文件的路径,所以我使用了这个“how to get the file path of a file?”代码 来自 StackOverflow,但此代码适用于 API 级别 22 及以下,但我的项目需要 API-26。
【问题讨论】:
-
您需要为此添加运行时权限,因为从 Android 6.0(API 级别 23)开始,用户在应用运行时授予应用权限,而不是在安装应用时。 read more from docs