Pushwoosh / pushwoosh-appcelerator-titanium

Other
33 stars 16 forks source link

Android: App in foreground - notification still shows in status bar #20

Closed rborn closed 7 years ago

rborn commented 8 years ago

Hi, I have this weird behaviour on Android 4.4.4, device One Plus One

If the app it's in foreground and a push comes, the notification shows in the statusbar but when I open the notification center nothing it's there.

I think the normal behaviour would be the notification not to show at all if the app is in foreground or to be able to set its behaviour.

I can provide a video if needed :) Thank you.

DimanAM commented 8 years ago

PW_BROADCAST_PUSH metadata can be used to control this behaviour: https://github.com/Pushwoosh/pushwoosh-appcelerator-titanium/blob/master/Titanium-Sample-iOS-Android/tiapp.xml#L45

rborn commented 8 years ago

I'll have a look and let you know, thank you

rborn commented 7 years ago

Sorry for the very late reply :(

I updated to the last version of the module and set the PW_BROADCAST_PUSH to false and now the notification seems to stay there.

However if the app is in the foreground, there should be no notification. Is this something that could be done?

Thank you.

DimanAM commented 7 years ago

PW_BROADCAST_PUSH has the opposite effect. If you set it to false all notification will appear in notification center. If it is true notifications received in foreground will be automatically handled (notification callback will be fired) and will not appear in notification center.