Skip to content

Instantly share code, notes, and snippets.

@abdallaadelessa
Created February 1, 2018 10:54
Show Gist options
  • Save abdallaadelessa/0bad829525608cb28dbd00e15643663d to your computer and use it in GitHub Desktop.
Save abdallaadelessa/0bad829525608cb28dbd00e15643663d to your computer and use it in GitHub Desktop.
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