diff --git a/framework/core/build.gradle.kts b/framework/core/build.gradle.kts index 1527255f..9dae95fc 100644 --- a/framework/core/build.gradle.kts +++ b/framework/core/build.gradle.kts @@ -29,6 +29,7 @@ android { } dependencies { + api(project(":core:foundation")) api(project(":core:network")) api(project(":core:runtime")) diff --git a/framework/core/src/main/kotlin/dev/teogor/ceres/framework/core/Activity.kt b/framework/core/src/main/kotlin/dev/teogor/ceres/framework/core/Activity.kt index 61430ad1..8748d404 100644 --- a/framework/core/src/main/kotlin/dev/teogor/ceres/framework/core/Activity.kt +++ b/framework/core/src/main/kotlin/dev/teogor/ceres/framework/core/Activity.kt @@ -16,6 +16,7 @@ package dev.teogor.ceres.framework.core +import android.content.Context import android.content.Intent import android.net.Uri import android.os.Bundle @@ -37,6 +38,10 @@ import androidx.compose.runtime.setValue import androidx.core.splashscreen.SplashScreen import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen import androidx.metrics.performance.JankStats +import dev.teogor.ceres.core.foundation.audioManagerUtils +import dev.teogor.ceres.core.foundation.compositions.LocalAudioManager +import dev.teogor.ceres.core.foundation.compositions.LocalMediaPlayer +import dev.teogor.ceres.core.foundation.mediaPlayerUtils import dev.teogor.ceres.core.network.NetworkMonitor import dev.teogor.ceres.data.compose.rememberPreference import dev.teogor.ceres.data.datastore.defaults.AppTheme @@ -103,6 +108,10 @@ open class Activity : ComponentActivity() { handleSplashScreen(splashScreen) + val context = this as Context + val audioManagerUtils = context.audioManagerUtils() + val mediaPlayerUtils = context.mediaPlayerUtils() + setContent { val darkTheme = isSystemInDarkTheme() @@ -195,6 +204,10 @@ open class Activity : ComponentActivity() { LocalNavigationParameters provides navigationParameters, LocalAnalyticsHelper provides analyticsHelper, LocalCrashlyticsHelper provides crashlyticsHelper, + + // Ceres Core Foundation - Composition Provider + LocalAudioManager provides audioManagerUtils, + LocalMediaPlayer provides mediaPlayerUtils, ) { val menuConfig = MenuConfig().apply { buildMenu() } val menuConfigHeader =