Skip to content

Instantly share code, notes, and snippets.

@Arunshaik2001
Created November 20, 2022 13:53
Show Gist options
  • Select an option

  • Save Arunshaik2001/04b247daf54a17efe3b2d2bc707d956b to your computer and use it in GitHub Desktop.

Select an option

Save Arunshaik2001/04b247daf54a17efe3b2d2bc707d956b to your computer and use it in GitHub Desktop.
override fun onReceive(p0: Context?, p1: Intent?) {
val actionString = p1?.action
if(actionString == "reply_action"){
val repliedNotification = android.app.Notification.Builder(p0!!, NotificationChannels.CHANNEL1)
.setSmallIcon(androidx.core.R.drawable.notification_bg_low_normal)
.setContentText(getMessageText(p1))
.build()
NotificationManagerCompat.from(p0).apply {
this.notify(12313, repliedNotification)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment