onGreatestScrollPercentageIncreased method

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

Called when a user has reached a greater scroll percentage on the page. The greatest scroll percentage is reset if the user navigates to a different page. If the current page's total height changes, this method will be called again only if the scroll progress reaches a higher percentage based on the new and current height of the page.

scrollPercentage - An integer indicating the percent of scrollable progress the user hasmade down the current page.

NOTE: available only if PlatformChromeSafariBrowser.isEngagementSignalsApiAvailable returns true.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • scrollPercentage: all platforms

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

Implementation

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