From 8937dc7b6bed6ec3bb12f9a737c4a12bdec67607 Mon Sep 17 00:00:00 2001
From: tapframe <85391825+tapframe@users.noreply.github.com>
Date: Sun, 26 Jul 2026 18:19:22 +0530
Subject: [PATCH] Update Play account and foreground service compliance
---
androidApp/src/playstore/AndroidManifest.xml | 18 ++++++++++++++++++
.../app/core/build/AppFeaturePolicy.android.kt | 1 +
.../PlayerNowPlayingController.android.kt | 8 +++++++-
.../app/core/build/AppFeaturePolicy.android.kt | 3 ++-
.../composeResources/values/strings.xml | 2 ++
.../nuvio/app/core/build/AppFeaturePolicy.kt | 1 +
.../app/features/settings/SettingsRootPage.kt | 15 +++++++++++++++
.../app/core/build/AppFeaturePolicy.desktop.kt | 1 +
.../app/core/build/AppFeaturePolicy.ios.kt | 1 +
.../app/core/build/AppFeaturePolicy.ios.kt | 1 +
10 files changed, 49 insertions(+), 2 deletions(-)
create mode 100644 androidApp/src/playstore/AndroidManifest.xml
diff --git a/androidApp/src/playstore/AndroidManifest.xml b/androidApp/src/playstore/AndroidManifest.xml
new file mode 100644
index 000000000..2468b6c5a
--- /dev/null
+++ b/androidApp/src/playstore/AndroidManifest.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/composeApp/src/androidFull/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.android.kt b/composeApp/src/androidFull/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.android.kt
index 364def91d..5c7a81647 100644
--- a/composeApp/src/androidFull/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.android.kt
+++ b/composeApp/src/androidFull/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.android.kt
@@ -10,4 +10,5 @@ actual object AppFeaturePolicy {
actual val heroTrailerPlaybackSupported: Boolean = true
actual val inAppUpdaterEnabled: Boolean = true
actual val imdbRatingLogoEnabled: Boolean = true
+ actual val mediaPlaybackForegroundServiceEnabled: Boolean = true
}
diff --git a/composeApp/src/androidMain/kotlin/com/nuvio/app/features/player/PlayerNowPlayingController.android.kt b/composeApp/src/androidMain/kotlin/com/nuvio/app/features/player/PlayerNowPlayingController.android.kt
index c5fdf7ca3..f89986bb4 100644
--- a/composeApp/src/androidMain/kotlin/com/nuvio/app/features/player/PlayerNowPlayingController.android.kt
+++ b/composeApp/src/androidMain/kotlin/com/nuvio/app/features/player/PlayerNowPlayingController.android.kt
@@ -20,6 +20,7 @@ import android.os.Looper
import android.os.SystemClock
import android.util.Log
import com.nuvio.app.R
+import com.nuvio.app.core.build.AppFeaturePolicy
import java.io.ByteArrayOutputStream
import java.lang.ref.WeakReference
import java.net.HttpURLConnection
@@ -106,7 +107,9 @@ internal class AndroidPlayerNowPlayingController(
get() = !released && metadata != null
init {
- createNotificationChannel(appContext)
+ if (AppFeaturePolicy.mediaPlaybackForegroundServiceEnabled) {
+ createNotificationChannel(appContext)
+ }
AndroidNowPlayingActionDispatcher.register(this)
}
@@ -288,6 +291,7 @@ internal class AndroidPlayerNowPlayingController(
}
private fun publishNotification() {
+ if (!AppFeaturePolicy.mediaPlaybackForegroundServiceEnabled) return
val currentMetadata = metadata ?: return
val notification = buildNotification(
context = appContext,
@@ -377,6 +381,7 @@ class PlayerNowPlayingService : Service() {
companion object {
internal fun publish(context: Context, notification: Notification) {
+ if (!AppFeaturePolicy.mediaPlaybackForegroundServiceEnabled) return
PlayerNowPlayingServiceState.notification = notification
val intent = Intent(context, PlayerNowPlayingService::class.java)
.setAction(ACTION_START_FOREGROUND)
@@ -394,6 +399,7 @@ class PlayerNowPlayingService : Service() {
}
internal fun hide(context: Context) {
+ if (!AppFeaturePolicy.mediaPlaybackForegroundServiceEnabled) return
PlayerNowPlayingServiceState.notification = null
runCatching { context.stopService(Intent(context, PlayerNowPlayingService::class.java)) }
context.getSystemService(NotificationManager::class.java)
diff --git a/composeApp/src/androidPlaystore/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.android.kt b/composeApp/src/androidPlaystore/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.android.kt
index f0ee56ff0..524c93125 100644
--- a/composeApp/src/androidPlaystore/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.android.kt
+++ b/composeApp/src/androidPlaystore/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.android.kt
@@ -3,11 +3,12 @@ package com.nuvio.app.core.build
actual object AppFeaturePolicy {
actual val pluginsEnabled: Boolean = false
actual val supportersContributorsPageEnabled: Boolean = true
- actual val accountDeletionEnabled: Boolean = false
+ actual val accountDeletionEnabled: Boolean = true
actual val personalMediaAddonCopyEnabled: Boolean = false
actual val p2pEnabled: Boolean = true
actual val trailerPlaybackMode: TrailerPlaybackMode = TrailerPlaybackMode.EXTERNAL
actual val heroTrailerPlaybackSupported: Boolean = false
actual val inAppUpdaterEnabled: Boolean = false
actual val imdbRatingLogoEnabled: Boolean = false
+ actual val mediaPlaybackForegroundServiceEnabled: Boolean = false
}
diff --git a/composeApp/src/commonMain/composeResources/values/strings.xml b/composeApp/src/commonMain/composeResources/values/strings.xml
index bee00f3b0..affcc835c 100644
--- a/composeApp/src/commonMain/composeResources/values/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values/strings.xml
@@ -432,6 +432,7 @@
Playback
Plugins
Poster Card Style
+ Privacy Policy
Settings
Streams
STREAMS
@@ -454,6 +455,7 @@
GENERAL
Manage available integrations
Manage episode release alerts and send a test notification.
+ Learn how Nuvio handles your data
Stream result display and badge URL rules.
Change to a different profile.
Switch Profile
diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.kt
index ec7ed1779..f080e9a77 100644
--- a/composeApp/src/commonMain/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.kt
+++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.kt
@@ -15,4 +15,5 @@ expect object AppFeaturePolicy {
val heroTrailerPlaybackSupported: Boolean
val inAppUpdaterEnabled: Boolean
val imdbRatingLogoEnabled: Boolean
+ val mediaPlaybackForegroundServiceEnabled: Boolean
}
diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/settings/SettingsRootPage.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/settings/SettingsRootPage.kt
index a2676246f..946819c2b 100644
--- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/settings/SettingsRootPage.kt
+++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/settings/SettingsRootPage.kt
@@ -15,10 +15,12 @@ import androidx.compose.material.icons.rounded.Notifications
import androidx.compose.material.icons.rounded.Palette
import androidx.compose.material.icons.rounded.People
import androidx.compose.material.icons.rounded.PlayArrow
+import androidx.compose.material.icons.rounded.Policy
import androidx.compose.material.icons.rounded.Tune
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.ui.Modifier
+import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import com.nuvio.app.core.build.AppVersionConfig
@@ -32,6 +34,7 @@ import nuvio.composeapp.generated.resources.compose_settings_page_integrations
import nuvio.composeapp.generated.resources.compose_settings_page_licenses_attributions
import nuvio.composeapp.generated.resources.compose_settings_page_notifications
import nuvio.composeapp.generated.resources.compose_settings_page_playback
+import nuvio.composeapp.generated.resources.compose_settings_page_privacy_policy
import nuvio.composeapp.generated.resources.compose_settings_page_supporters_contributors
import nuvio.composeapp.generated.resources.compose_settings_root_account_description
import nuvio.composeapp.generated.resources.compose_settings_root_appearance_description
@@ -43,6 +46,7 @@ import nuvio.composeapp.generated.resources.compose_settings_root_downloads_titl
import nuvio.composeapp.generated.resources.compose_settings_root_general_section
import nuvio.composeapp.generated.resources.compose_settings_root_integrations_description
import nuvio.composeapp.generated.resources.compose_settings_root_notifications_description
+import nuvio.composeapp.generated.resources.compose_settings_root_privacy_policy_description
import nuvio.composeapp.generated.resources.compose_settings_root_switch_profile_description
import nuvio.composeapp.generated.resources.compose_settings_root_switch_profile_title
import nuvio.composeapp.generated.resources.compose_settings_root_trakt_description
@@ -59,6 +63,8 @@ import nuvio.composeapp.generated.resources.about_supporters_contributors_subtit
import nuvio.composeapp.generated.resources.about_licenses_attributions_subtitle
import org.jetbrains.compose.resources.stringResource
+private const val PRIVACY_POLICY_URL = "https://nuvio.tv/privacy-policy"
+
internal fun LazyListScope.settingsRootContent(
isTablet: Boolean,
onPlaybackClick: () -> Unit,
@@ -177,6 +183,7 @@ internal fun LazyListScope.settingsRootContent(
}
if (showAboutSection) {
item {
+ val uriHandler = LocalUriHandler.current
SettingsSection(
title = stringResource(Res.string.compose_settings_root_about_section),
isTablet = isTablet,
@@ -192,6 +199,14 @@ internal fun LazyListScope.settingsRootContent(
)
SettingsGroupDivider(isTablet = isTablet)
}
+ SettingsNavigationRow(
+ title = stringResource(Res.string.compose_settings_page_privacy_policy),
+ description = stringResource(Res.string.compose_settings_root_privacy_policy_description),
+ icon = Icons.Rounded.Policy,
+ isTablet = isTablet,
+ onClick = { uriHandler.openUri(PRIVACY_POLICY_URL) },
+ )
+ SettingsGroupDivider(isTablet = isTablet)
SettingsNavigationRow(
title = stringResource(Res.string.compose_settings_page_licenses_attributions),
description = stringResource(Res.string.about_licenses_attributions_subtitle),
diff --git a/composeApp/src/desktopMain/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.desktop.kt b/composeApp/src/desktopMain/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.desktop.kt
index bc70435f0..68dfa94f3 100644
--- a/composeApp/src/desktopMain/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.desktop.kt
+++ b/composeApp/src/desktopMain/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.desktop.kt
@@ -10,4 +10,5 @@ actual object AppFeaturePolicy {
actual val heroTrailerPlaybackSupported: Boolean = false
actual val inAppUpdaterEnabled: Boolean = false
actual val imdbRatingLogoEnabled: Boolean = true
+ actual val mediaPlaybackForegroundServiceEnabled: Boolean = false
}
diff --git a/composeApp/src/iosAppStore/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.ios.kt b/composeApp/src/iosAppStore/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.ios.kt
index 6cc679aac..9cb218276 100644
--- a/composeApp/src/iosAppStore/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.ios.kt
+++ b/composeApp/src/iosAppStore/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.ios.kt
@@ -10,4 +10,5 @@ actual object AppFeaturePolicy {
actual val heroTrailerPlaybackSupported: Boolean = false
actual val inAppUpdaterEnabled: Boolean = false
actual val imdbRatingLogoEnabled: Boolean = false
+ actual val mediaPlaybackForegroundServiceEnabled: Boolean = false
}
diff --git a/composeApp/src/iosFull/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.ios.kt b/composeApp/src/iosFull/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.ios.kt
index 526130b96..0afebb29e 100644
--- a/composeApp/src/iosFull/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.ios.kt
+++ b/composeApp/src/iosFull/kotlin/com/nuvio/app/core/build/AppFeaturePolicy.ios.kt
@@ -10,4 +10,5 @@ actual object AppFeaturePolicy {
actual val heroTrailerPlaybackSupported: Boolean = false
actual val inAppUpdaterEnabled: Boolean = false
actual val imdbRatingLogoEnabled: Boolean = true
+ actual val mediaPlaybackForegroundServiceEnabled: Boolean = false
}