Skip to content

Instantly share code, notes, and snippets.

Last active September 24, 2022 08:56
What would you like to do?
private fun removeAlarm(taskInfo: TaskInfo){
val alarmManager = activity?.getSystemService(Context.ALARM_SERVICE) as AlarmManager
val intent = Intent(requireContext(),
// It is not necessary to add putExtra
intent.putExtra("task_info", taskInfo)
val pendingIntent = PendingIntent.getBroadcast(requireContext(),, intent, PendingIntent.FLAG_IMMUTABLE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment