From af4cc64691b6e3af251ed22ae96fa9c8aa007b59 Mon Sep 17 00:00:00 2001 From: David Fox Date: Tue, 4 Oct 2016 00:09:13 -0400 Subject: [PATCH] Allow silent notifs to update badge count --- android/src/ti/goosh/IntentService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/android/src/ti/goosh/IntentService.java b/android/src/ti/goosh/IntentService.java index 4614bbb..5603112 100755 --- a/android/src/ti/goosh/IntentService.java +++ b/android/src/ti/goosh/IntentService.java @@ -106,6 +106,10 @@ private void parseNotification(Bundle bundle) { } else { Log.i(LCAT, "Not showing notification cause missing data.alert"); showNotification = false; + if (data.has("badge")) { + int badge = data.getAsJsonPrimitive("badge").getAsInt(); + BadgeUtils.setBadge(context, badge); + } } if (showNotification) {