显示用户在SD卡上的特定文件夹,并允许选择文件文件夹、卡上、文件、用户

2023-09-04 04:57:19 作者:心不动则不痛

在我的比赛,我保存的文件(的.xml)在SD卡中的文件夹,当用户保存一个特定的模式。现在,在加载保存的文件,我需要显示用户的所有保存的文件。我想告诉他们为你做的,而选择从画廊图像,如下

In my game, I save files(.xml) to a folder in sd card when user save a particular mode. Now while loading saved files, I need to show user all saved files. I want to show them as you do while selecting images from gallery as below

     Intent intent = new Intent();
     intent.setType("image/*");
     intent.setAction(Intent.ACTION_PICK);
     startActivity(intent);

我可以做这样的事情?我已搜查,但没有找到。帮助将AP preciated。

Can I do something like this? I have searched, but did not find. Help would be appreciated.

注意:我可以通过读取我的应用程序的ListView保存的所有文件,并显示给用户,但我想给第二个优先适用于这样做。

Note : I can do so by fetching all saved files in my app listView and show to user but I would like to give 2nd priority for that.

感谢

推荐答案

有没有这个内置的系统应用程序。理论是对用户不暴露到文件系统。如果你想这样做,而不是code自己的实现,那么你可以使用 OpenIntents软件并有 OI文件管理器当然还有的proboelm用户可能未安装应用程序,所以你必须要ppared提示他们安装$ P $。您的用户可能不是preciate这一点。

There is no built in system app for this. The theory is to not expose the users to the file system. If you do want to do it and not code your own implementation then you can use OpenIntents and there OI File Manager there is of course the proboelm that the user may not have the app installed so you have to be prepared to prompt them to install it. Your user may not apreciate this.

我用我的应用程序IpBike这种方法。我把我的用户有一番脑筋,并能应付的文件系统,文件导入和导出为一个积分功能。

I do use this approach in my app IpBike. I take my users to have some brains and be able to cope with a file system, and file import and export is an intergral feature.

 
精彩推荐
图片推荐