Skip to content

Instantly share code, notes, and snippets.

@Arunshaik2001
Created November 23, 2022 15:36
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/a4834dcb54b1a5c0267c3e682ddbfa40 to your computer and use it in GitHub Desktop.
Save Arunshaik2001/a4834dcb54b1a5c0267c3e682ddbfa40 to your computer and use it in GitHub Desktop.
with(builder) {
setContentTitle(
context.resources.getString(
R.string.message_from,
simpleMessage.sender
)
)
setSmallIcon(R.drawable.ic_stat_notification)
setCategory(android.app.Notification.CATEGORY_MESSAGE)
setContentIntent(
PendingIntent.getActivity(
context,
REQUEST_CONTENT,
Intent(context, MainActivity3::class.java)
.setAction(Intent.ACTION_VIEW)
.setData(contentUri),
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE
)
)
setShowWhen(true)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment