getCastContext

fun Context.getCastContext(): CastContext

Retrieves the shared instance of CastContext.

This function attempts to retrieve the existing shared instance of CastContext. If it doesn't exist, it initializes a new instance and returns it.

Call this method inside your Activity or Application for early initialization. The earlier this is called, the better the user experience.

Return

The shared instance of CastContext.