android6-4 Exercise 3: Reminder and tap ==================================== class ReminderWorker( appContext: Context, params: WorkerParameters ) : CoroutineWorker(appContext, params) { override suspend fun doWork(): Result { val id = inputData.getLong("noteId", -1) val text = inputData.getString("text") ?: return Result.failure() showReminder(applicationContext, id, text) return Result.success() } } // "Remind me in an hour": inexact, so no exact-alarm permission is needed fun scheduleReminder(context: Context, noteId: Long, text: String, delayMinutes: Long) { val request = OneTimeWorkRequestBuilder() .setInitialDelay(delayMinutes, TimeUnit.MINUTES) .setInputData(workDataOf("noteId" to noteId, "text" to text)) .build() WorkManager.getInstance(context).enqueueUniqueWork( "reminder-$noteId", ExistingWorkPolicy.REPLACE, request ) } Tap handling: in MainActivity.onCreate read intent.getLongExtra("noteId", -1) and pass it to the UI state or navigation so the matching note opens (general knowledge; onNewIntent also matters if the activity is already open: report whether you needed it). Why not exact: "remind me in an hour" does not need second-level accuracy; exact alarms need SCHEDULE_EXACT_ALARM (a special permission denied by default since Android 14, docs) and asking for it costs user trust. Code unrun.