linkService

suspend fun linkService(service: StreamingService, context: Context, registry: ActivityResultRegistry): Boolean

Link a streaming service.

Return

True if linking is successful or False if linking was canceled.

Opens the streaming service linking flow which involves a web view login for the specified streaming service followed by profile selection and optional pin collection if supported. If linking is successful, the success flag will be True. If linking was canceled then the success flag will be False. If linking fails the future will complete exceptionally.

Caution: Given the task based architecture of the sdk and the asynchronous nature of this method, care should be taken when invoking it from user interactive elements to debounce or otherwise prevent multiple invocations until the previous one completes.

Parameters

service

The streaming service to link.

context

Android context that will be used to start the linking activity.

registry

ActivityResultRegistry of the current activity.