migrate timer to ForegroundService for background survival
Move CountDownTimer logic from a Dialog into a ForegroundService so the timer survives when the user tabs away or the activity is destroyed. The activity becomes a thin UI projection bound to the service via TimerStateListener callbacks. - Create CountdownService with notification, state persistence, and ToneGenerator/Vibrator ownership - Persist timer state to SharedPreferences for process death recovery - Add notification with progress bar and Stop/Restart actions - Embed countdown UI in activity_main.xml alongside picker UI - Delete CountdownDialog and dialog_countdown.xml - Update AndroidManifest with foreground service permissions
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
"felipecaslazana.vscode-android-logcat",
|
||||
"ms-azuretools.vscode-docker",
|
||||
"fwcd.kotlin",
|
||||
"vscjava.vscode-java-pack"
|
||||
"vscjava.vscode-java-pack",
|
||||
"Anthropic.claude-code"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user