Skip to content

Instantly share code, notes, and snippets.

@fobidlim
Created March 12, 2017 16:28
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 fobidlim/0ec8f18f4920e2bf6e35417ca6938fe4 to your computer and use it in GitHub Desktop.
Save fobidlim/0ec8f18f4920e2bf6e35417ca6938fe4 to your computer and use it in GitHub Desktop.
Creating NotificaitonCompat.Builder
final NotificationCompat.Builder builder = new NotificationCompat.Builder(this)
.setColor(ResourcesCompat.getColor(getResources(), R.color.red, null))
.setSmallIcon(R.drawable.ic_stat_name)
.setDefaults(Notification.DEFAULT_ALL)
.setPriority(Notification.PRIORITY_MAX)
.setContentTitle(getString(R.string.app_name))
.setContentText(getString(R.string.app_name) + " TEST");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment