CastReceiverUtils

  • CastReceiverUtils is a utility class providing helper methods for Cast receiver development.

  • It includes a static method, parseCastLaunchRequestFromLaunchIntent, to extract the CastLaunchRequest from an Intent.

  • This method is useful for getting the initial CastLaunchRequest when an app is launched by Cast, before senders are connected.

public class CastReceiverUtils extends Object

Utility class for miscellaneous helper methods.

Public Method Summary

static CastLaunchRequest
parseCastLaunchRequestFromLaunchIntent(Intent intent)
Parse the CastLaunchRequest from a launch intent.

Inherited Method Summary

Public Methods

public static CastLaunchRequest parseCastLaunchRequestFromLaunchIntent (Intent intent)

Parse the CastLaunchRequest from a launch intent.

This method can be used to know the CastLaunchRequest which is used to initially launch the app for the first time. Typically the CastLaunchRequest can be obtained from the SenderInfo of each sender, but for the initial launch, the first sender is not connected yet.

This method returns null if intent is not a Cast launch intent.