android - 导入 OpenIntents 以在 Android 应用程序中使用 OI 文件管理器

标签 android android-intent import file-browser

我想在我的应用程序中使用 OI 文件管理器作为集成文件浏览器来搜索和选择文件。

我可以使用以下命令实现浏览器:

Intent intent = new Intent("org.openintents.action.PICK_FILE");
startActivityForResult(intent, 1);

然后看了下demo例子,有问题,如果要导入

import org.openintents.intents.FileManagerIntents;

我在 Eclipse 中收到以下错误:

The import org.openintents cannot be resolved

问题是什么?

谢谢,迈克

最佳答案

您不需要导入任何东西。

Intent intent = new Intent("org.openintents.action.PICK_FILE");
startActivityForResult(intent, 1);

以上行将调用设备上安装的 OI 文件管理器并运行 PICK_FILE 操作。

关于android - 导入 OpenIntents 以在 Android 应用程序中使用 OI 文件管理器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12405313/

相关文章:

java - Android 覆盖 PointF 以获得接近 java Point2D.double 的东西

android - Intent 未发送 ACTION_POWER_CONNECTED

android - Unity Facebook apprequest notifcation 打开浏览器而不是 play store

android - Cordova |无法使用 `cordova platform add android` 添加 Android 平台

android - 如何处理来自搜索管理器的回调?

android - 将新 Intent 发送到广播接收器会提供先前 Intent 的额外值

import - 将 HTML 和 CSS 与 Javascript Lit 元素分离

python - 通过路径导入 python 模块

python - 尝试将 *.pyc 作为模块导入

Android 按钮动画与计时同步