【发布时间】:2015-03-08 17:48:41
【问题描述】:
在我的应用程序中,我有在 ListActivity 中显示的文件列表,现在我想添加额外的选项,例如 windows :(打开文件夹位置) 以打开此文件的目录我测试一些代码但不工作抛出异常:
File file=new File(path);
Uri url = Uri.fromFile(file);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(url);
startActivity(intent);
例外:
03-08 21:14:55.451: E/AndroidRuntime(15708):
android.content.ActivityNotFoundException: No Activity found to handle Intent {
act=android.intent.action.VIEW dat=file:///storage/extSdCard/Bluetooth }
我能做什么?
【问题讨论】: