Google Cast SDK Release - December 4, 2023

361 views
Skip to first unread message

cast-sdk-announcements

unread,
Dec 4, 2023, 3:04:05 PM12/4/23
to cast-sdk-announcements

Hello Google Cast developers!


Updates to the Google Cast SDK have been released for the following SDK libraries:


- Android Sender 21.4.0

- Android TV Receiver 21.0.1


Release notes: https://developers.google.com/cast/docs/release-notes


Changes related to the Cast Icon coming in Android Sender v.21.4.0

  • Version 21.4.0 of the Cast SDK will depend on androidx.mediarouter:mediarouter:1.6.0. This means that updating your app to use this Cast SDK release will also load androidx.mediarouter:mediarouter:1.6.0. androidx.mediarouter:mediarouter:1.6.0 contains the following changes:

    • MediaRouteButtons will always be visible by default.

    • The MediaRouteButton#setAlwaysVisible and MediaRouteActionProvider#setAlwaysVisible APIs will be deprecated.

      • Calls to these methods will result in a no-op.

    • The MediaRouteChooserDialog will be getting some new features:

      • The dialog’s previous behavior was that an infinite spinner would be shown as long as zero devices had been found. The new behavior will provide users with more information about connecting to a Cast device.

      • If zero Cast devices have been found on the network after a 6 second timeout, the dialog will continue to show a loading spinner but will also display a hint for why devices may not be discoverable.

      • After 14 more seconds (total 20 second timeout), attempts to discover devices will stop. The dialog will continue to display the previously displayed hint and will offer a link to a Google help page where the user can learn more about casting to a device.

  • Version 21.4.0 reduces the conditions for when Cast device discovery is started by an application without user-action. This will remove unnecessary battery impact without negatively impacting the user experience.

After updating to androidx.mediarouter:mediarouter:1.6.0 or updating to the Cast SDK version 21.4.0, verify the following user experience flows in your application:

  1. Any MediaRouteButtons are visible and clickable even when there are zero receivers on the current network.

  2. Any MediaRouteButtons are visible and clickable even when the phone is not connected to Wi-Fi.

  3. Clicking on a MediaRouteButton while there are zero discoverable receiver devices on the current network opens the device chooser dialog as normal.

  4. Clicking on a MediaRouteButton while the phone is not connected to Wi-Fi opens the device chooser dialog as normal.

  5. With the device chooser dialog open, disable Wi-Fi on the phone or switch to a network with zero discoverable receiver devices to put the dialog in the zero device state and make sure that your app handles the empty state correctly. Handling the state correctly means alerting users after a reasonable timeout (~6 seconds) that zero devices have been found.

Please utilize the Cast SDK issue tracker for any questions or concerns about these changes.


Best regards,


Google Cast SDK Team


Reply all
Reply to author
Forward
0 new messages