This library allows the usage of RxJava with the new Android M permission model. If you need to trigger the permission request from a specific event, you need to setup your event as an observable inside an initialization phase. You can use JakeWharton/RxBinding to turn your view to an observable (not included in the library). Because your app may be restarted during the permission request, the request must be done during an initialization phase. This may be Activity.onCreate, or View.onFinishInflate, but not pausing methods like onResume, because you'll potentially create an infinite request loop, as your requesting activity is paused by the framework during the permission request. If not, and if your app is restarted during the permission request (because of a configuration change for instance), the user's answer will never be emitted to the subscriber.

Features

  • Avoid worrying about the framework version
  • Android runtime permissions powered by RxJava2
  • If the sdk is pre-M, the observer will automatically receive a granted result
  • Prevents you to split your code between the permission request and the result handling
  • All what RX provides about transformation, filter, chaining, etc.

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

Apache License V2.0

Follow RxPermissions

RxPermissions Web Site

Other Useful Business Software
Full-stack observability with actually useful AI | Grafana Cloud Icon
Full-stack observability with actually useful AI | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of RxPermissions!

Additional Project Details

Operating Systems

Android

Programming Language

Java

Related Categories

Java Libraries

Registered

2021-06-04