This library allows one to automatically complete sequences based on a second lifecycle stream. This capability is useful in Android, where incomplete subscriptions can cause memory leaks. You must start with an Observable<T> representing a lifecycle stream. Then you use RxLifecycle to bind a sequence to that lifecycle. It assumes you want to end the sequence in the opposing lifecycle event - e.g., if subscribing during start, it will terminate on stop. If you subscribe after pause, it will terminate at the next destruction event (e.g., pasue will terminate in stop). RxLifecycle does not actually unsubscribe the sequence. Instead it terminates the sequence. The way in which it does so varies based on the type. If a sequence requires the Subscription.unsubscribe() behavior, then it is suggested that you manually handle the Subscription yourself and call unsubscribe() when appropriate.

Features

  • Complete sequences based on a second lifecycle stream
  • The rxlifecycle-kotlin module provides built-in extensions to the base RxJava types
  • You must start with an Observable<T> representing a lifecycle stream, then use RxLifecycle to bind a sequence to that lifecycle
  • You can bind when the lifecycle emits anything
  • You can bind to when a specific lifecyle event occurs
  • You can let RxLifecycle determine the appropriate time to end the sequence

Project Samples

Project Activity

See All Activity >

License

Apache License V2.0

Follow RxLifecycle

RxLifecycle Web Site

Other Useful Business Software
AI-generated apps that pass security review Icon
AI-generated apps that pass security review

Stop waiting on engineering. Build production-ready internal tools with AI—on your company data, in your cloud.

Retool lets you generate dashboards, admin panels, and workflows directly on your data. Type something like “Build me a revenue dashboard on my Stripe data” and get a working app with security, permissions, and compliance built in from day one. Whether on our cloud or self-hosted, create the internal software your team needs without compromising enterprise standards or control.
Try Retool free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of RxLifecycle!

Additional Project Details

Operating Systems

Android

Programming Language

Java

Related Categories

Java Product Lifecycle Management (PLM) Software

Registered

2021-07-22