Ấn ĐộPatilShreyas/permission-flow-android
Know about real-time state of a Android app Permissions with Kotlin Flow APIs.
Thành tựu nổi bật
Những danh hiệu mới nhất của dự án
#1 Repository của tuần
#1 Repository của tuần
#1 Repository của tuần
📱 Theo dõi quyền Android realtime bằng Kotlin Flow
Biết trạng thái quyền bất kỳ lúc nào, từ bất kỳ lớp nào trong app.
Permission Flow for Android là thư viện giúp theo dõi trạng thái quyền (permission) của ứng dụng Android theo thời gian thực thông qua Kotlin Flow APIs. Phù hợp cho dự án lớn chia thành nhiều module, đặc biệt là module không có UI nhưng cần truy cập trạng thái quyền.
✨ Điểm nổi bật
- Theo dõi quyền đơn lẻ: Dùng
getPermissionState()để lắng nghe trạng thái một quyền. - Theo dõi nhiều quyền: Dùng
getMultiplePermissionState()để lấy trạng thái nhiều quyền cùng lúc. - Hỗ trợ Jetpack Compose: Sử dụng
rememberPermissionState()vàrememberMultiplePermissionState(). - StateFlow API: Trả về
StateFlow<PermissionState>hoặcStateFlow<MultiplePermissionState>. - Yêu cầu quyền an toàn: Dùng
registerForPermissionFlowRequestsResult()để đăng ký yêu cầu quyền. - Plug and Play: Dễ tích hợp, chỉ cần thêm dependency và sử dụng.
💡 Vì sao đáng chú ý
Không cần phụ thuộc vào Activity hoặc Fragment để theo dõi quyền. Bất kỳ lớp nào ở bất kỳ layer nào cũng có thể lắng nghe trạng thái quyền thời gian thực. Lý tưởng cho kiến trúc sạch và module dữ liệu.
#Android #Kotlin #JetpackCompose #StateFlow #Permissions #OpenSource #TiniX
Dự án tương tự
Khám phá các dự án và mô hình AI khác có sự tương đồng.
基于无障碍,高级选择器,订阅规则的自定义屏幕点击安卓应用 | An Android APP with custom screen tapping based on Accessibility, Advanced Selectors, and Subscription Rules
Reverse engineer anything with agents, from app behavior down to native binaries.
集找番、追番、看番的一站式弹幕追番平台,云收藏同步 (Bangumi),离线缓存,BitTorrent,弹幕云过滤。100% Kotlin/Compose Multiplatform
Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.