-
- All Implemented Interfaces:
-
com.appsflyer.internal.session_ready.SessionReadyManager
public final class SessionReadyManagerImpl implements SessionReadyManager
Implementation of SessionReadyManager that manages session readiness conditions and triggers callbacks when all conditions are met.
-
-
Constructor Summary
Constructors Constructor Description SessionReadyManagerImpl(DependencyProvider<IdProvider> idProvider, DependencyProvider<AFDeepLinkManager> deeplinkManagerProvider)
-
Method Summary
Modifier and Type Method Description UnitsetOnSessionReadyListener(SessionReadyListener listener)Registers a callback to be invoked when the session is ready. UnitstartEvaluation(Intent activityIntent)Starts a new session readiness evaluation cycle based on the provided intent. UnitonDeeplinkExtractionFinished()Marks the deeplink processed condition as satisfied. UnitfinishEvaluation()Completes the current evaluation cycle. BooleanisSessionReady()Returns whether all session readiness conditions are currently satisfied. BooleanisListenerRegistered()Returns whether a SessionReadyListener is currently registered. -
-
Constructor Detail
-
SessionReadyManagerImpl
SessionReadyManagerImpl(DependencyProvider<IdProvider> idProvider, DependencyProvider<AFDeepLinkManager> deeplinkManagerProvider)
-
-
Method Detail
-
setOnSessionReadyListener
Unit setOnSessionReadyListener(SessionReadyListener listener)
Registers a callback to be invoked when the session is ready. If a callback is already registered, it will be replaced.
If evaluation is already in progress and all conditions are satisfied, the callback will be triggered immediately. This supports late registration scenarios where the listener is set after the app moves to foreground.
- Parameters:
listener- The callback listener, or null to unregister
-
startEvaluation
Unit startEvaluation(Intent activityIntent)
Starts a new session readiness evaluation cycle based on the provided intent. Registers conditions based on the current launch counter and intent state. Marks the foreground condition as satisfied immediately since this is called from onBecameForeground.
This method runs evaluation even if no listener is registered yet, allowing for late registration where the listener can be set after conditions are already satisfied.
- Parameters:
activityIntent- The intent from the activity that moved to foreground
-
onDeeplinkExtractionFinished
Unit onDeeplinkExtractionFinished()
Marks the deeplink processed condition as satisfied. Should be called when deeplink processing completes. Can be called before evaluation starts - condition will be marked satisfied and checked when evaluation begins. Condition state is stored regardless of whether a listener is registered.
-
finishEvaluation
Unit finishEvaluation()
Completes the current evaluation cycle. Resets all conditions and clears the list to prepare for the next cycle.
-
isSessionReady
Boolean isSessionReady()
Returns whether all session readiness conditions are currently satisfied.
-
isListenerRegistered
Boolean isListenerRegistered()
Returns whether a SessionReadyListener is currently registered.
-
-
-
-