Created
September 5, 2021 00:34
-
-
Save navczydev/7952fb0c3791d042dfe8394bb68e394a 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
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