feat(android): add reminders and background sync
- Add local overdue reminders with notification channel and tap-to-date\n- Extract shared sync engine for foreground and WorkManager sync\n- Schedule 15-minute sync/reminder work and restore tasks after boot\n- Request notification permission and document Android background limits
This commit is contained in:
@@ -6,6 +6,7 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.materialswitch.MaterialSwitch
|
||||
import com.google.android.material.textfield.TextInputEditText
|
||||
import com.misaki.schedule.R
|
||||
import com.misaki.schedule.background.BackgroundScheduler
|
||||
import com.misaki.schedule.data.Prefs
|
||||
import com.misaki.schedule.sync.SyncManager
|
||||
|
||||
@@ -24,6 +25,7 @@ object SettingsDialog {
|
||||
.setPositiveButton(R.string.save) { _, _ ->
|
||||
prefs.serverUrl = url.text?.toString().orEmpty()
|
||||
prefs.enabled = enabled.isChecked
|
||||
BackgroundScheduler.update(context, prefs)
|
||||
syncManager.reload()
|
||||
}
|
||||
.show()
|
||||
|
||||
Reference in New Issue
Block a user