File Chooser

Description
It鈥檚 a Java source code that can be easy integrated into your Android project.
How to Integrate
1. Copy all files from app/src/main/res/drawable/ folder and all next files into your project:/app/src/main/java/com/filechooser/app/FileChooser.java /app/src/main/res/values/file_chooser_strings.xml /app/src/main/res/layout/file_chooser.xml /app/src/main/res/layout/file_chooser_item.xml /app/src/main/res/xml/file_provider.xml2. 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" .../>4. Add provider into AndroidManifest.xml:
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.FileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_provider"/>
</provider>
5. 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);
6. 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
}
}| Type | Android App |
|---|---|
| Author | OlDenWeb |
| Category | Mobile / Android / Ui Elements |
| Price | $12 |
| Sales | 3 |
| Published | Aug 23, 2016 |
| Last Update | Sep 9, 2019 |
| Compatible Software | Android 9.0, Android 8.1, Android 8.0, Android 7.2.x, Android 7.1.x, Android 6.0, Android 5.1.x, Android 5.0, Android 4.4.x, Android 4.3.x, Android 4.2.x, Android 4.1.x |
| Mobile Files Included | .apk, .java, .xml |
Categories
Tags
External listing. code.market does not sell this product and does not process payment for it. Pricing, payment, delivery, licensing, refunds, and support are handled by the third-party merchant on its own website. We may earn an affiliate commission from a referral. Details.
Products of the Week.
Submit馃
Free LinkedIn Likes From Real Members | LinkedInLikes
Get free LinkedIn likes on your posts from real members who react by hand. No password needed: you only share a link.
Website 路 12,847 views 路 46 clicksWebsite 路 Week 49 路 12,847 views 路 46 clicks
馃
Free Medium Claps From Real Writers | MediumPlace
Free Medium claps on your stories from verified accounts of real writers, each given by hand. No bots, no Medium password, nothing to pay. Paste a link.
Website 路 7,964 views 路 10 clicksWebsite 路 Week 49 路 7,964 views 路 10 clicks
馃
Free GitHub Stars From Real Developers | GitWow
Get free GitHub stars on your repository from real developers who star by hand. No token or password, and it's free.
Website 路 15,624 views 路 28 clicksWebsite 路 Week 49 路 15,624 views 路 28 clicks
#4
Free Substack Likes From Real Writers | StackRooms
Free Substack likes on your posts and Notes from verified accounts of real writers, given by hand. Free to ask, free to receive. Just share a link.
Website 路 7,784 views 路 2 clicksWebsite 路 Week 49 路 7,784 views 路 2 clicks
#5
Free Twitter Likes From Real People | SupaTwitter
Free Twitter likes on your tweets from verified accounts of real people, each given by hand. No bots, no Twitter password, nothing to pay. Paste a link.
Website 路 7,679 views 路 4 clicksWebsite 路 Week 49 路 7,679 views 路 4 clicks
#6
Free X Likes From Real People, Given by Hand | XFast
Free X likes on your posts from verified accounts of real people, each one given by hand. No bots, no X password, no conditions. Paste a link to start.
Website 路 7,591 views 路 0 clicksWebsite 路 Week 49 路 7,591 views 路 0 clicks