如何在 android 应用程序中使用文件选择器

How to use file picker in android app

我正在开发一个简单的 android 应用程序,我想在按下按钮时使用文件选择器,那么如何在我的应用程序中实现文件选择器。

我之前花了一些时间弄清楚这个问题,所以总结一下

Intents provide the ability to hook into third-party app components for content selection. This works well for media files, but if you want users to be able to select any file, they must have an existing "file explorer" app installed. Because many Android devices don't have stock File Explorers, the developer must often instruct the user to install one, or build one, themselves. aFileChooser solves this issue.

您可以从 iPaulPro/aFileChooser.

克隆它