From 8e03d4daf7c149052e81e4b912eea51fc05ae9a2 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 24 May 2026 20:32:49 +0000 Subject: [PATCH 1/2] Extract foreground service notification strings to localized resources - Added localized strings for notification channel name, description, title, text, and action label. - Replaced hardcoded technical and aggressive terminology (e.g. "Kill", "Click to open") with standard mobile UX phrasing (e.g. "Stop", "Tap to open"). - Updated Cam.kt to use getString() for referencing the new string resources. Co-authored-by: manupawickramasinghe <73810867+manupawickramasinghe@users.noreply.github.com> --- .Jules/palette.md | 3 +++ .../main/java/com/samsung/android/scan3d/serv/Cam.kt | 10 +++++----- app/src/main/res/values/strings.xml | 7 +++++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.Jules/palette.md b/.Jules/palette.md index 8e61b09..6415be5 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -146,3 +146,6 @@ ## 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-30 - Localized Notification Content +**Learning:** Hardcoding notification strings (e.g. "RemoteCam run", "RemoteCam (active)", "Click to open", "Kill") in code circumvents localization systems and exposes untranslated, potentially technical text to the user. Using harsh phrasing like "Kill" for user-facing actions is a poor UX practice compared to standard terminology like "Stop". +**Action:** Always extract foreground service notification content, including channel names, descriptions, titles, text, and action labels, to localized string resources. Additionally, use standard mobile UX phrasing (e.g. "Stop" rather than "Kill") for action buttons to ensure clear and approachable communication. 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..458f68e 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%% + + + RemoteCam Service + RemoteCam is running + RemoteCam (active) + Tap to open + Stop From d0ed959cd653a01d15b473051c6a817e318dd530 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 24 May 2026 20:36:49 +0000 Subject: [PATCH 2/2] Extract foreground service notification strings to localized resources - Added localized strings for notification channel name, description, title, text, and action label. - Replaced hardcoded technical and aggressive terminology (e.g. "Kill", "Click to open") with standard mobile UX phrasing (e.g. "Stop", "Tap to open"). - Updated Cam.kt to use getString() for referencing the new string resources. Co-authored-by: manupawickramasinghe <73810867+manupawickramasinghe@users.noreply.github.com>