validateRelationship method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'CustomTabsSession.validateRelationship', apiUrl: 'https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#validateRelationship(int,android.net.Uri,android.os.Bundle)')])
- required CustomTabsRelationType relation,
- required WebUri origin,
Requests to validate a relationship between the application and an origin.
See here for documentation about Digital Asset Links. This methods requests the browser to verify a relation with the calling application, to grant the associated rights.
If this method returns true, the validation result will be provided through PlatformChromeSafariBrowserEvents.onRelationshipValidationResult.
Otherwise the request didn't succeed.
relation – Relation to check, must be one of the CustomTabsRelationType constants.
origin – Origin.
extras – Reserved for future use.
Officially Supported Platforms/Implementations:
- Android Chrome Custom Tabs (Official API - CustomTabsSession.validateRelationship)
Parameters - Officially Supported Platforms/Implementations:
relation: all platformsorigin: all platforms
Use the PlatformChromeSafariBrowser.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'CustomTabsSession.validateRelationship',
apiUrl:
'https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#validateRelationship(int,android.net.Uri,android.os.Bundle)',
),
],
)
Future<bool> validateRelationship({
required CustomTabsRelationType relation,
required WebUri origin,
}) {
throw UnimplementedError(
'validateRelationship is not implemented on the current platform',
);
}