It’s a Java source code that can be easy integrated into your Android project. The source is for Eclipse but it can be also imported into Android Studio.
How to Integrate
1. Copy all files from res/drawable folder and all next files into your project:
src/com/oldenweb/filechooser/FileChooser.java res/values/file_chooser_strings.xml res/layout/file_chooser.xml res/layout/file_chooser_item.xml
2. Add permission into AndroidManifest.xml:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
3. Add chooser activity into AndroidManifest.xml:
<activity android:name=".FileChooser" android:configChanges="orientation|..." />
4. Add code to open chooser activity into browse button listener:
Intent intent = new Intent(this, FileChooser.class); intent.putExtra("path", "/storage"); // path to opened folder intent.putExtra("showFiles", true); // show or hide files (true/false) intent.putExtra("returnFile", true); // return file or folder path (true/false) startActivityForResult(intent, CHOOSER_REQUEST_CODE);
5. Add code to get result from chooser activity:
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode == RESULT_OK && requestCode == CHOOSER_REQUEST_CODE) { String path = data.getStringExtra("path"); // returned path } }
[eltd_button size=”huge-full-width” type=”outline” text=”Download & Demo Links” custom_class=”#” icon_pack=”font_awesome” fa_icon=”” link=”” target=”_blank” color=”” hover_color=”” background_color=”” hover_background_color=”” border_color=”” hover_border_color=”” font_size=”” font_weight=”” margin=””]
Demo = File Chooser
[eltd_button size=”huge” type=”” text=”Full Live Demo” custom_class=”” icon_pack=”font_awesome” fa_icon=”fa-laptop” link=”https://codecanyon.net/item/file-chooser/17535121″ target=”_blank” color=”” hover_color=”” background_color=”” hover_background_color=”” border_color=”” hover_border_color=”” font_size=”” font_weight=”” margin=””]
Kindly Note: We update new contents like WordPress Themes, Plugins, PHP Scripts everyday. But remember that you should never use this items in a commercial website. All the contents posted here for development & testing purpose only. We’re not responsible for any damage, use at your own RISK! We highly recommend to buy File Chooser from the The Developer ( OlDenWeb ) website. Thank you.
Download = File Chooser-[Updated].zip