Skip to content

Instantly share code, notes, and snippets.

Last active September 24, 2022 08:56
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save garg-lucifer/36622ce8db0574c6fa24ccd738d2462c to your computer and use it in GitHub Desktop.
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