Created
February 17, 2020 15:16
-
-
Save januprasad/0f2995994d997d56170b44e8eec1e6c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun startAlarm(calendar: Calendar) { | |
val alarmManager = getSystemService(Context.ALARM_SERVICE) as AlarmManager | |
val intent = Intent(this, AlarmReceiver::class.java) | |
val pendingIntent = PendingIntent.getBroadcast(this, 0, intent, 0) | |
alarmManager.setExact(AlarmManager.RTC_WAKEUP, calendar.timeInMillis, pendingIntent) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment