Created
February 11, 2019 16:48
-
-
Save PierfrancescoSoffritti/01ee69cf75c7985833fb1ec371e2cfa2 to your computer and use it in GitHub Desktop.
How to send YouTube videos from your Android app to a Chromecast device: https://medium.com/@soffritti.pierfrancesco/how-to-send-youtube-videos-from-your-android-app-to-a-chromecast-device-541d59ea1260
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class CastOptionsProvider implements OptionsProvider { | |
public CastOptions getCastOptions(Context appContext) { | |
// Register your receiver on Cast Developer Console to get this ID: https://cast.google.com/publish | |
String receiverId = ""; | |
return new CastOptions.Builder() | |
.setReceiverApplicationId(receiverId) | |
.build(); | |
} | |
public List<SessionProvider> getAdditionalSessionProviders(Context context) { | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment