diff --git a/.Jules/palette.md b/.Jules/palette.md index 8e61b09..6054658 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. +## 2024-03-24 - Extract Foreground Service Notification Strings +**Learning:** System-level UI components like Notification channels and actions are directly visible to users in Android settings and lock screens. Using hardcoded, developer-centric terminology (like 'Kill' or 'CHANNEL_ID') creates a jarring and unprofessional user experience. +**Action:** Always extract notification channel names, descriptions, and action labels into localized string resources. Replace aggressive technical terms with standard, user-friendly mobile UX phrasing (e.g., 'Stop' instead of 'Kill', 'Tap' instead of 'Click'). 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..ed9e98e 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..020e665 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -48,6 +48,13 @@ No web browser found. Please install a browser to view the repository. + + Camera Service + Background service to keep the remote camera running + RemoteCam (active) + Tap to open + Stop + Stop Server? This will stop the camera stream and close the application. Stop