Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-30 - User-Friendly Notification Phrasing
**Learning:** Hardcoded, technical, or aggressive terminology (e.g., using a raw "CHANNEL_ID" for the channel name, or words like "Kill" and "Click" for actions) in user-facing system notifications creates an abrasive and confusing experience. Notification channels and content are exposed directly to users in the Android system settings and status bar, so they must be descriptive and localized.
**Action:** Always extract foreground service notification and channel text (titles, descriptions, actions) into localized string resources (`strings.xml`). Utilize standard mobile UX phrasing (e.g., "Stop" instead of "Kill", "Tap" instead of "Click") to ensure clear, polite, and universally understood interactions.
10 changes: 5 additions & 5 deletions app/src/main/java/com/samsung/android/scan3d/serv/Cam.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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_content)).setOngoing(true)
.setSmallIcon(R.drawable.ic_linked_camera).addAction(R.drawable.ic_close, getString(R.string.stop_button),pendingIntentKill)
.setContentIntent(pendingIntent)


Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@
<string name="frame_time_format">%1$d ms</string>
<string name="bitrate_format">%1$d kB/sec</string>
<string name="quality_format">%1$d%%</string>

<!-- Foreground Service Strings -->
<string name="notification_channel_name">Camera Service</string>
<string name="notification_channel_desc">Maintains the camera connection and streaming service in the background</string>
<string name="notification_title">RemoteCam (active)</string>
<string name="notification_content">Tap to open controls</string>
</resources>