Skip to main content

set_on_lifecycle

Function set_on_lifecycle 

Source
pub fn set_on_lifecycle(callback: Box<dyn Fn(AppLifecycle) + Send>)
Expand description

Register a callback for coarse app lifecycle (foreground/background).

Safe to call from any thread. Deliveries are coalesced to the latest state and dispatched on the UI loop via about_to_wait (same pattern as deeplinks).