Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class AlarmReceiver : BroadcastReceiver() {
private val TAG = "AlarmReceiver"
override fun onReceive(context: Context, intent: Intent) {
when (intent.action) {
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