rosuH/AndroidFilePicker
소개
FilePicker는 빠른 통합과 높은 커스터마이징 및 구성 가능성을 목표로 지속적으로 발전하는 작고 빠른 파일 선택 라이브러리입니다~
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +1
- in 1 month
- -2
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
Android File Picker🛩️
If you're using 0.x version, checkout the README_0.x file.
Well, it doesn't have a name like Rocky, Cosmos or Fish. Android File Picker, like its name, is a local file selector framework. Some of his characteristics are described below:
- Launcher in Activity or Fragment
- Start with a single line of code
- Browse and select all files in local storage
- Custom Root path to start
- Built-in default file type and file discriminator
- Or you can implement the file type yourself
- Built in Single Choice mode and Multiple Choice mode.
- Custom list filter
- Just want to show pictures(Or videos, audio...)? No problem!
- Of course, you can just display the folder
- Custom item click event: only need to implement the listener
- Apply different themes, including four built-in themes and custom themes
- More to find out yourself
| Rail | Reply | Crane | Shrine |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Version Compatibility
It depends on your targetAPI.
targetAPI > 33, may be you are finding photo pickertargetAPI == 33- Handle media permissions by your onw
- This lib will only show media files which your app has permission to access
targetAPI <= 33- Set
android:requestLegacyExternalStorage="true"in yourAndroidManifest.xmlfile - Handler
android.permission.READ_EXTERNAL_STORAGEpermission by your own - This lib will show all files in your storage
- Set
Download
In your project build.gradle:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
In your module build.gradle:
dependencies {
implementation 'me.rosuh:AndroidFilePicker:$latest_version'
}
This lib now support AndroidX, check the version below.
Check out releases page to see more versions.
Usage 📑
Permission
You should request permission by yourself, this lib will not request permission for you. See Version Compatibility for more details.
Launch 🚀
FilePickerManager
.from(context)
.forResult(FilePickerManager.REQUEST_CODE)
Receive Result
In onActivityResult() callback of the starting Activity or Fragment:
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
when (requestCode) {
FilePickerManager.instance.REQUEST_CODE -> {
if (resultCode == Activity.RESULT_OK) {
val list = FilePickerManager.instance.obtainData()
// do your work
} else {
Toast.makeText(this@SampleActivity, "You didn't choose anything~", Toast.LENGTH_SHORT).show()
}
}
}
}
The result is a path list of the selected file (ArrayList<String>()).
Docs
Special Thanks To:
관련 프로젝트 살펴보기
불러오는 중…



