-
Notifications
You must be signed in to change notification settings - Fork 514
Android - Don't display system notification if not needed #178
Comments
Hi Rocco, I am investigating the issue you reported. thanks for your report
|
I've also encountered the exact same problem as you. I took a while to realise this was a bug... I did not find a solution that covered all the cases, and eventually I gave up background notifications on iOS when the app is closed. This issue should be top priority as this is a big problem when implementing support for the two platforms at the same time. |
The fix has been completed server-side, and should be deployed in production next week. |
I am still getting the issue is it still not deployed or ...? |
Not yet. It will happen in the next days |
hi @ogeidix did you deploy this fix yet? |
yes, the issue has been fixed. |
@ogeidix I'm not sure it's related to this PR, I used FCM SDK( |
Hi,
here at Spreaker we use GCM to notify our mobile apps that they need to sync new data, so we basically send a notification to tell the app that some kind of data are changed and they need to be synced.
We started with Android and now we're working on porting the same features on iOS, but in order to have GCM deliver the notification to the app while is in background we needed to add the
content_available
parameter. No issue on iOS side but the Android app started behave differently that before.We target play services 8.4 and we discovered that this version introduced the auto-display of the system notification in
content_available
is specified. The issue here is that there isn't anything to display because we intentionally don't fill thenotification
field, but the system displays an "empty" notification with just the app icon and the name of the app. We discovered that this behaviour is implemented inGcmListenerService
that checks if the value ofgcm.notification.e
is1
but providing fallbacks value for all the values of thenotification
field if not specified.The
gcm.notification.e
field seems to be automatically added to the notification by GCM whencontent_available
is true, but we have been able to override it by adding thenotification
field with a value of{"e":0}
.This is clearly an undocumented feature, and we think it will be safer if will be fixed in the GCM server (using
gcm.notification.e=0
) or inGcmListenerService
client by checking if the user don't specify anything in thenotification
field.Thanks,
Rocco
The text was updated successfully, but these errors were encountered: