- 适用于AndroidQ的简易图片选择器。
- 基于协程的系统文件选择,相册选择,系统拍照,系统裁剪。
- Uri转为File的究极解决方案。
- 最新已兼容至Android12
- 兼容
Intent.ACTION_OPEN_DOCUMENT_TREE
选择文件夹Uri获取后路径
使用详情可见文档WIKI
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
dependencies {
implementation 'com.github.iDeMonnnnnn:QFsolution:1.2.5'
}
<!--如果你使用相机相关功能必须要添加,否则可忽略-->
<uses-permission android:name="android.permission.CAMERA" />
<!--存储权限在低于AndroidQ的手机上还是需要的-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!--AndroidR及以上手机上访问sd卡需要存储管理的特殊权限,非文件管理类App不建议申请->
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
请见Demo示例代码
可见源码注释,写的很详细。
如果你有问题或者建议,请Issues.
Copyright (c) 2020 DeMon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.