| java.lang.Object | |
| ↳ | com.google.android.gms.cast.framework.CastButtonFactory |
A factory class to set up a MenuItem or a MediaRouteButton to be used as a Cast
button. The SDK will set a MediaRouteSelector which is built by
the CastContext, based on the discovery options set inside CastOptions.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Sets up the
MediaRouteActionProvider in menu. | |||||||||||
Sets up the given
MediaRouteButton. | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Sets up the MediaRouteActionProvider in menu. Returns the MenuItem
of the MediaRouteActionProvider.
| context | The application Context. |
|---|---|
| menu | Menu reference. |
| menuResourceId | The resource id of the cast button in the xml menu descriptor file. |
| IllegalArgumentException | If menu doesn't contain a menu item with
menuResourceId identifier, or the menu item doesn't have a
MediaRouteActionProvider.
|
|---|
Sets up the given MediaRouteButton.
| context | The application Context. |
|---|---|
| button | The MediaRouteButton instance to set up.
|