Challenge 1: A Notification Channel and a Notification — Solution fun createTaskReminderChannel(context: Context) { val channel = NotificationChannel( "task_reminders", "Task Reminders", NotificationManager.IMPORTANCE_DEFAULT ).apply { description = "Reminders about your upcoming tasks" } val notificationManager = context.getSystemService(NotificationManager::class.java) notificationManager.createNotificationChannel(channel) } fun showTaskReminder(context: Context, taskTitle: String) { val notification = NotificationCompat.Builder(context, "task_reminders") .setSmallIcon(R.drawable.ic_task) .setContentTitle("Task Reminder") .setContentText(taskTitle) .setPriority(NotificationCompat.PRIORITY_DEFAULT) .build() if (ContextCompat.checkSelfPermission(context, Manifest.permission.POST_NOTIFICATIONS) == PackageManager.PERMISSION_GRANTED) { NotificationManagerCompat.from(context).notify(TASK_REMINDER_NOTIFICATION_ID, notification) } } Notes: - createTaskReminderChannel should be called once, early in the app's lifecycle (e.g. inside the Application class's onCreate, per Course 2 Chapter 5's @HiltAndroidApp setup) — creating the same channel ID again later is a safe no-op, not an error. - The "task_reminders" string passed to NotificationCompat.Builder must match the channel ID used in createTaskReminderChannel exactly — a mismatched or non-existent channel ID means the notification either fails to show or falls back to default (unconfigured) behavior. - The permission check before .notify(...) is not optional — omitting it would crash the app with a SecurityException on Android 13+ if the permission hasn't been granted, exactly as the chapter warned.