1

annotation processing/code generation adds significant overhead to build times and breaks incremental builds.

Can I (reactively, aka not by manually forwarding events) get a fine-grained callback for Lifecycle.Event.ON_STOP using the Android Lifecycle Architecure Component?

Or does this use reflection (slow) if I choose not to use annotation processing?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
ZakTaccardi
  • 12,212
  • 15
  • 59
  • 107

1 Answers1

1

One solution is to implement the GenericLifecycleObserver interface and then capture the events in the onStateChanged method.

adienthu
  • 143
  • 1
  • 6