onPostMessage method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'CustomTabsCallback.onPostMessage', apiUrl: 'https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsCallback#onPostMessage(java.lang.String,android.os.Bundle)')])
- String message
Called when a tab controlled by this PlatformChromeSafariBrowser has sent a postMessage. If PlatformChromeSafariBrowser.postMessage is called from a single thread, then the messages will be posted in the same order. When received on the client side, it is the client's responsibility to preserve the ordering further.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - CustomTabsCallback.onPostMessage)
Parameters - Officially Supported Platforms/Implementations:
message: all platforms
Use the PlatformChromeSafariBrowserEvents.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'CustomTabsCallback.onPostMessage',
apiUrl:
'https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsCallback#onPostMessage(java.lang.String,android.os.Bundle)',
),
],
)
void onPostMessage(String message) {}