Skip to content

Instantly share code, notes, and snippets.

@hitherejoe
Created June 12, 2017 21:02
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 hitherejoe/8a70005001154d2a1c448f806bb587dc to your computer and use it in GitHub Desktop.
Save hitherejoe/8a70005001154d2a1c448f806bb587dc to your computer and use it in GitHub Desktop.
val notificationID = 2
val messageCount = 8
val notification = Notification.Builder(this, id)
.setContentTitle(getString(R.string.title_discounts))
.setContentText(getString(R.string.description_discounts))
.setSmallIcon(R.drawable.ic_airplanemode_active_grey_24dp)
.setBadgeIconType(BADGE_ICON_SMALL)
.setNumber(messageCount)
.build()
notificationManager.notify(notificationID, notification)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment