Skip to main content

Callbacks and Delegates​

Implement FSStatusListener and register it with fsRegisterStatusListener() to receive capture status callbacks. All methods have no-op defaults, so override only the events you care about. Registering the same instance more than once has no effect, and unregistering an instance that is not registered has no effect.

All callbacks are invoked on the main/UI thread.

CallbackInvoked when
onSession(session: FSSessionData)A capture session starts or resumes. If a session is already active when the listener is registered, this fires with the current session. FSSessionData has url and id.
onSessionStopped()The current capture session stops (for example, when the app is backgrounded). iOS only. Android never invokes this.
onSessionDisabled(reason: FSReason)Fullstory attempted to start a session but it was disabled (for example, a connectivity issue or the org running out of sessions). Capture is retried the next time the app is foregrounded.
onFSError(reason: FSReason)Fullstory encountered an error and will no longer capture in this process.
onFSDisabled(reason: FSReason)Fullstory is disabled (for example, an incompatible device/OS or missing configuration). A session will not begin at a later point.
onRetry(reason: FSRetryReason)Fullstory is retrying a request to its backend. Includes the request type, count, delaySeconds, code (-1 if an exception caused the retry), and errorMessage.
onRemoved(reason: FSRemovalReason)Fullstory removed an item from its upload queue and will not retry it. sessionId is available on Android only.

FSReason contains an integer code and a human-readable message. FSRetryType and FSRemovalType include an UNKNOWN value for types introduced by newer capture SDKs.

Special Consideration​

On platforms without a capture SDK, or if the SDK is not present at runtime, listeners are never invoked.

Additional Information​