From e5f8b1fecc9d3869de75894dd66b9d53acefa6a4 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Tue, 26 May 2026 20:37:20 +0000
Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20[UX=20improvement]=20?=
=?UTF-8?q?Refine=20notification=20terminology?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Extract foreground service notification strings to `strings.xml` to support localization. Replaces technical and aggressive hardcoded strings (e.g. "Kill", "Click to open") with standard mobile UX terminology (e.g. "Stop", "Tap to open") to improve the user experience.
Co-authored-by: manupawickramasinghe <73810867+manupawickramasinghe@users.noreply.github.com>
---
.Jules/palette.md | 4 ++++
.../main/java/com/samsung/android/scan3d/serv/Cam.kt | 10 +++++-----
app/src/main/res/values/strings.xml | 7 +++++++
3 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/.Jules/palette.md b/.Jules/palette.md
index 8e61b09..50b2168 100644
--- a/.Jules/palette.md
+++ b/.Jules/palette.md
@@ -146,3 +146,7 @@
## 2026-05-20 - Mouse Hover States for Custom Selectors
**Learning:** Custom drawable selectors (like `ic_shutter.xml`) on Android often define `state_pressed` and `state_focused` but omit `state_hovered`. This strips visual feedback for users navigating with pointer devices (mice, trackpads) on environments like Chromebooks or Samsung DeX, degrading the user experience compared to native components.
**Action:** Always include `android:state_hovered="true"` alongside focus and pressed states in custom interactive background selectors to ensure universal visual feedback across all input methods.
+
+## 2026-05-26 - Localizing System Notifications
+**Learning:** System notifications, especially for foreground services, expose internal app strings directly to the OS notification shade. Using hardcoded technical terms (like 'CHANNEL_ID' or 'Kill') creates a jarring, unpolished experience that cannot be localized.
+**Action:** Always extract foreground service notification titles, descriptions, and action labels to `strings.xml` and use standard mobile UX terminology (e.g., 'Stop' instead of 'Kill', 'Tap' instead of 'Click') before passing them to `NotificationCompat.Builder`.
diff --git a/app/src/main/java/com/samsung/android/scan3d/serv/Cam.kt b/app/src/main/java/com/samsung/android/scan3d/serv/Cam.kt
index 902764a..72b2633 100644
--- a/app/src/main/java/com/samsung/android/scan3d/serv/Cam.kt
+++ b/app/src/main/java/com/samsung/android/scan3d/serv/Cam.kt
@@ -45,10 +45,10 @@ class Cam : Service() {
"start" -> {
val channel = NotificationChannel(
CHANNEL_ID,
- CHANNEL_ID,
+ getString(R.string.notification_channel_name),
NotificationManager.IMPORTANCE_DEFAULT
)
- channel.description = "RemoteCam run"
+ channel.description = getString(R.string.notification_channel_desc)
val notificationManager = getSystemService(NotificationManager::class.java)
notificationManager.createNotificationChannel(channel)
@@ -72,9 +72,9 @@ class Cam : Service() {
val builder =
NotificationCompat.Builder(this, CHANNEL_ID)
- .setContentTitle("RemoteCam (active)")
- .setContentText("Click to open").setOngoing(true)
- .setSmallIcon(R.drawable.ic_linked_camera).addAction(R.drawable.ic_close, "Kill",pendingIntentKill)
+ .setContentTitle(getString(R.string.notification_title))
+ .setContentText(getString(R.string.notification_text)).setOngoing(true)
+ .setSmallIcon(R.drawable.ic_linked_camera).addAction(R.drawable.ic_close, getString(R.string.notification_action_stop),pendingIntentKill)
.setContentIntent(pendingIntent)
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index b34ffb5..abf55ac 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -69,4 +69,11 @@
%1$d ms
%1$d kB/sec
%1$d%%
+
+
+ Camera Service
+ Active camera streaming session
+ RemoteCam (active)
+ Tap to open
+ Stop