bump media3 and other dependencies again and make it compiles

This commit is contained in:
Gary Wang 2022-06-18 00:23:10 +08:00
parent 1b2b40b64a
commit 3e337a3712
No known key found for this signature in database
GPG Key ID: 5D30A4F15EA78760
6 changed files with 11 additions and 28 deletions

1
.idea/gradle.xml generated
View File

@ -13,7 +13,6 @@
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>

View File

@ -46,13 +46,14 @@ android {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
namespace 'net.blumia.pcmdroid'
}
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
@ -60,7 +61,7 @@ dependencies {
implementation "androidx.compose.material:material-icons-extended:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
def nav_compose_version = '2.4.1'
def nav_compose_version = '2.4.2'
implementation "androidx.navigation:navigation-compose:$nav_compose_version"
def lifecycle_version = '2.4.1'
@ -78,7 +79,7 @@ dependencies {
implementation "com.squareup.okhttp3:okhttp:4.9.0"
def media3_version = '1.0.0-alpha03'
def media3_version = '1.0.0-beta01'
implementation "androidx.media3:media3-ui:$media3_version"
implementation "androidx.media3:media3-exoplayer:$media3_version"
implementation "androidx.media3:media3-session:$media3_version"

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.blumia.pcmdroid">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/>

View File

@ -26,7 +26,7 @@ class PlaybackService : MediaLibraryService() {
private val librarySessionCallback = CustomMediaLibrarySessionCallback()
private inner class CustomMediaLibrarySessionCallback
: MediaLibrarySession.MediaLibrarySessionCallback
: MediaLibrarySession.Callback
{
@androidx.annotation.OptIn(UnstableApi::class)
override fun onGetLibraryRoot(
@ -59,21 +59,6 @@ class PlaybackService : MediaLibraryService() {
}
}
class CustomMediaItemFiller : MediaSession.MediaItemFiller {
override fun fillInLocalConfiguration(
session: MediaSession,
controller: MediaSession.ControllerInfo,
mediaItem: MediaItem
): MediaItem {
// Return the media item that it will be played
return MediaItem.Builder()
// Use the metadata values to fill our media item
.setUri(mediaItem.mediaMetadata.mediaUri)
.setMediaMetadata(mediaItem.mediaMetadata)
.build()
}
}
override fun onGetSession(controllerInfo: MediaSession.ControllerInfo): MediaLibrarySession {
return mediaLibrarySession
}
@ -107,7 +92,6 @@ class PlaybackService : MediaLibraryService() {
mediaLibrarySession =
MediaLibrarySession.Builder(this, player, librarySessionCallback)
.setMediaItemFiller(CustomMediaItemFiller())
.setSessionActivity(pendingIntent!!)
.build()
}

View File

@ -5,8 +5,8 @@ buildscript {
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.1.2' apply false
id 'com.android.library' version '7.1.2' apply false
id 'com.android.application' version '7.2.1' apply false
id 'com.android.library' version '7.2.1' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
}

View File

@ -1,6 +1,6 @@
#Fri Nov 05 23:12:10 CST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME