如何打开(使用意向)在Android的编程方式的我的文件文件夹? [英] How to open the My Files folder in Android Programatically (using Intent)?
本文介绍了如何打开(使用意向)在Android的编程方式的我的文件文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用它打开了画廊,音乐播放器,Dropbox的和联系人下面code,我想我的文件夹拿开编程,请让我知道,如果有任何具体的意图参数,我需要通过获取文件管理器中打开。
I am using the below code which opens up the Gallery, Music Player, Dropbox and Contacts, i want the My Files folder to get open programatically, please let me know if there are any specific intent parameters i need to pass to get the File Manager open.
如果它是不可能通过的意图,那么请给我一个片段或暗示以编程方式打开我的文件文件夹。
if it is not possible through intent then please give me a snippet or an hint to open the My Files folder programatically.
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("*/*");
Intent i = Intent.createChooser(intent, "View Default File Manager");
startActivityForResult(i, CHOOSE_FILE_REQUESTCODE);
感谢。
推荐答案
您可以使用此code到文件中的文件。
You can use this code to file the files.
int PICKFILE_RESULT_CODE=1;
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("file/*");
startActivityForResult(intent,PICKFILE_RESULT_CODE);
这将帮助您从您的存储浏览文件。
this will help you to browse the files from your storage.
这篇关于如何打开(使用意向)在Android的编程方式的我的文件文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文