问题描述
我从PC上传文件到我的android手机。 我想从应用程序中打开此文件。 在网上可以找到许多示例代码,但是在我的环境中没有任何示例代码。 该应用程序提出了几个可以处理此意图的应用程序,但所有应用程序都显示一个空白的下载目录。 我的代码是:
Intent intent = new Intent();
intent.setAction(DownloadManager.ACTION_VIEW_DOWNLOADS);
try {
startActivityForResult(
Intent.createChooser(intent,"Select a File to Upload"),FILE_SELECT_CODE);
} catch (android.content.ActivityNotFoundException ex) {
// Potentially direct the user to the Market with a Dialog
Toast.makeText(this,"Please install a File Manager.",Toast.LENGTH_SHORT).show();
}
设置了READ_EXTERNAL_STORAGE和WRITE_EXTERNAL_STORAGE权限。
有什么想法吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)