onSessionEnded method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'EngagementSignalsCallback.onSessionEnded', apiUrl: 'https://developer.android.com/reference/androidx/browser/customtabs/EngagementSignalsCallback#onSessionEnded(boolean,android.os.Bundle)')])
void onSessionEnded(
  1. bool didUserInteract
)

Called when a CustomTabsSession is ending or when no further Engagement Signals callbacks are expected to report whether any user action has occurred during the session.

didUserInteract - Whether the user has interacted with the page in any way, e.g. scrolling.

NOTE: available only if PlatformChromeSafariBrowser.isEngagementSignalsApiAvailable returns true.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • didUserInteract: all platforms

Use the PlatformChromeSafariBrowserEvents.isMethodSupported method to check if this method is supported at runtime.

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(
      apiName: 'EngagementSignalsCallback.onSessionEnded',
      apiUrl:
          'https://developer.android.com/reference/androidx/browser/customtabs/EngagementSignalsCallback#onSessionEnded(boolean,android.os.Bundle)',
    ),
  ],
)
void onSessionEnded(bool didUserInteract) {}