Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class AlarmReceiver : BroadcastReceiver() {
private val TAG = "AlarmReceiver"
override fun onReceive(context: Context, intent: Intent) {
when (intent.action) {
ACTION_SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED -> {
Toast.makeText(context, "RECEIVED ALARM PERMISSION", Toast.LENGTH_LONG).show()
}
"from alarm" -> {
Toast.makeText(context, "ALARM FIRED", Toast.LENGTH_LONG).show()
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment