Skip to content

Instantly share code, notes, and snippets.

@Lavanyagaur22
Last active January 4, 2020 18:57
Show Gist options
  • Save Lavanyagaur22/0ba4735ff990a7ec967d3af6190e8c62 to your computer and use it in GitHub Desktop.
Save Lavanyagaur22/0ba4735ff990a7ec967d3af6190e8c62 to your computer and use it in GitHub Desktop.
val bigTextStyle = NotificationCompat.Builder(this, "first")
.setSmallIcon(R.drawable.ic_launcher_foreground)
.setContentTitle("Hello There")
.setContentText("General Master!")
.setStyle(
NotificationCompat.BigTextStyle()
.bigText(getString(R.string.big_string))
)
.setPriority(NotificationCompat.PRIORITY_DEFAULT).build()
//Show the notification with the help of NotificationManager, Unique ID ->3
nm.notify(3, bigTextStyle)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment