From 75bad72d83cac1f5f42c37f44283eb79c80b2887 Mon Sep 17 00:00:00 2001 From: CappielloAntonio Date: Thu, 6 Jan 2022 11:07:39 +0100 Subject: [PATCH] First basic implementation of cast functionality --- app/build.gradle | 4 ++ app/src/main/AndroidManifest.xml | 5 ++ .../play/service/MediaService.java | 51 +++++++++++++++---- .../play/ui/fragment/HomeFragment.java | 2 + .../play/util/MappingUtil.java | 4 ++ app/src/main/res/menu/main_page_menu.xml | 8 ++- app/src/main/res/values/strings.xml | 1 + 7 files changed, 63 insertions(+), 12 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index bad27c8b..e8d6c249 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -54,6 +54,9 @@ dependencies { implementation "androidx.cardview:cardview:1.0.0" implementation 'androidx.legacy:legacy-support-v4:1.0.0' + // Google GMS + implementation 'com.google.android.gms:play-services-cast-framework:21.0.0' + // Android Material implementation 'com.google.android.material:material:1.4.0' @@ -70,6 +73,7 @@ dependencies { implementation "androidx.media3:media3-common:1.0.0-alpha01" implementation "androidx.media3:media3-exoplayer:1.0.0-alpha01" implementation "androidx.media3:media3-ui:1.0.0-alpha01" + implementation "androidx.media3:media3-cast:1.0.0-alpha01" annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0' annotationProcessor 'androidx.room:room-compiler:2.4.0' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a282a05c..53d330c6 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -16,6 +16,11 @@ android:theme="@style/AppTheme" android:usesCleartextTraffic="true" android:allowBackup="false"> + + + + app:showAsAction="always" /> + + Priority given to the transcoding mode. If set to \"Direct play\" the bitrate of the file will not be changed. playNotificationChannelName playNotificationChannelNameDescription + Cast \ No newline at end of file