Skip to content

Commit

Permalink
Set notification number on pre O
Browse files Browse the repository at this point in the history
  • Loading branch information
luca020400 committed Nov 7, 2017
1 parent 6cefd85 commit f910de5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ class NotificationService : JobService() {
val notificationManager = NotificationManagerCompat.from(this)
val i = Intent(this, MainActivity::class.java)
.putExtra("drawer_open_id", tabToOpen)
val intent = PendingIntent.getActivity(this, MainActivity.REQUEST_CODE, i, PendingIntent.FLAG_UPDATE_CURRENT)
val intent = PendingIntent.getActivity(this, MainActivity.REQUEST_CODE, i,
PendingIntent.FLAG_UPDATE_CURRENT)

val style = NotificationCompat.InboxStyle()

Expand All @@ -258,6 +259,7 @@ class NotificationService : JobService() {
.setContentIntent(intent)
.setStyle(style)
.setLights(Color.BLUE, 3000, 3000)
.setNumber(content.size)
.setAutoCancel(true)

if (vibrate)
Expand Down

0 comments on commit f910de5

Please sign in to comment.