Skip to content

Instantly share code, notes, and snippets.

@Arunshaik2001
Created November 20, 2022 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Arunshaik2001/04b247daf54a17efe3b2d2bc707d956b to your computer and use it in GitHub Desktop.
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