-
public interface IApplicationLifecycleHandlerImplementations of the application lifecycle handler added via IApplicationService.addApplicationLifecycleHandler will be notified throughout the application lifecycle. This should be used over the Android-provided ActivityLifecycleCallbacks, it provides an abstraction more specific to the OneSignal SDK
-
-
Method Summary
Modifier and Type Method Description abstract UnitonFocus(Boolean firedOnSubscribe)Called when the application is brought into the foreground. abstract UnitonUnfocused()Called when the application has been brought out of the foreground, to the background. -
-
Method Detail
-
onFocus
abstract Unit onFocus(Boolean firedOnSubscribe)
Called when the application is brought into the foreground. This callback can be fired immediately on subscribing to the IApplicationService (when the IApplicationService itself is started too late to capture the application's early lifecycle events), or through natural application lifecycle callbacks.
- Parameters:
firedOnSubscribe- Method is fired from subscribing or from application lifecycle callbacks
-
onUnfocused
abstract Unit onUnfocused()
Called when the application has been brought out of the foreground, to the background.
-
-
-
-