diff --git a/android/manifest b/android/manifest index 187cdea..36d07e4 100644 --- a/android/manifest +++ b/android/manifest @@ -3,7 +3,7 @@ # during compilation, packaging, distribution, etc. # -version: 3.5.3 +version: 3.5.4 apiversion: 4 architectures: arm64-v8a armeabi-v7a x86 x86_64 description: titanium-firebase-cloud-messaging diff --git a/android/src/firebase/cloudmessaging/TiFirebaseMessagingService.java b/android/src/firebase/cloudmessaging/TiFirebaseMessagingService.java index c1c3328..8197513 100644 --- a/android/src/firebase/cloudmessaging/TiFirebaseMessagingService.java +++ b/android/src/firebase/cloudmessaging/TiFirebaseMessagingService.java @@ -123,6 +123,7 @@ private Boolean showNotification(RemoteMessage remoteMessage) { String parseTitle = ""; String parseText = ""; boolean isParse = false; + boolean noContent = false; if ( TiApplication.isCurrentActivityInForeground()) { showNotification = false; @@ -145,7 +146,7 @@ private Boolean showNotification(RemoteMessage remoteMessage) { && params.get("big_text") == null && params.get("big_text_summary") == null && params.get("ticker") == null && params.get("image") == null) { // no actual content - don't show it - showNotification = false; + noContent = true; } // Check if it is a default Parse/Sashido message ("data.data.alert") @@ -215,14 +216,14 @@ private Boolean showNotification(RemoteMessage remoteMessage) { Log.e(TAG, "Error adding fields: " + ex.getMessage()); } - if (!showNotification) { + if (noContent) { // hidden notification - still send broadcast with data for next app start Intent i = new Intent().setAction("ti.firebase.messaging.hidden-notification"); i.addCategory(Intent.CATEGORY_LAUNCHER); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); i.putExtra("fcm_data", jsonData.toString()); sendBroadcast(i); - return false; + return true; } Intent notificationIntent = new Intent(this, PushHandlerActivity.class);