项目
在 GitHub 查看 
DylanCaiCoding/ActivityResultLauncher
关于
Replace startActivityForResult() method gracefully, based on the Activity Result API. (优雅地替代 startActivityForResult(),基于 Activity Result API)
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README_CN.md
原文ActivityResultLauncher
English | 中文
Activity Result API 是官方用于替代 startActivityForResult() 和 onActivityResult() 的工具。但是 API 用起来并不是很友好,所以本库能帮助你在尽可能多的场景用更简洁易用的代码来使用 Activity Result API,并且支持对项目用到 startActivityForResult() 的功能进行封装使用。
Feature
- 优雅地替代
startActivityForResult() - 支持 Kotlin 和 Java 用法
- 支持协程用法
- 支持拍照(已适配 Android 10)
- 支持录像(已适配 Android 10)
- 支持选择图片或视频
- 支持裁剪图片(已适配 Android11)
- 支持请求权限
- 支持打开蓝牙
- 支持打开定位
- 支持使用存储访问框架 SAF
- 支持选择联系人
Demo

点击或者扫描二维码下载
Gradle
在根目录的 build.gradle 添加:
allprojects {
repositories {
// ...
maven { url 'https://www.jitpack.io' }
}
}
添加依赖:
dependencies {
implementation 'com.github.DylanCaiCoding:ActivityResultLauncher:1.1.2'
}
Wiki
Kotlin 用法
Java 用法
其它
更新日志
作者其它的库
| 库 | 简介 |
|---|---|
| Longan | 可能是最好用的 Kotlin 工具类集合 |
| LoadingStateView | 深度解耦标题栏或加载中、加载失败、无数据等缺省页 |
| ViewBindingKTX | 最全面的 ViewBinding 工具 |
| MMKV-KTX | 用属性委托的方式使用 MMKV |
License
Copyright (C) 2021. Dylan Cai
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
探索相关项目
加载中…
