[Android]doesn't show notification when the App is running in foreground.

Comments

6 comments

  • Avatar
    Alexander Belyaev

    Hello !

    Actually the Pushwoosh SDK automatically handles notifications received in foreground. This is equivalent to a click on a notification. Therefore notifications are not saved in the Notification Center(status bar). To prevent SDK from handling all notifications received in foreground just add the following string to your AndroidManifest.xml :

    <meta-data android:name="PW__NO_BROADCAST_PUSH" android:value="“false”">

    Regards, Alex.

  • Avatar
    craft

    Thank you Alex.

    I tried both <meta-data android:name="PW_NO_BROADCAST_PUSH" android:value="“false”"/> and <meta-data android:name="PW__NO_BROADCAST_PUSH" android:value="“false”"/>

    neither of them works. The push still doesn't show when the App is running in foreground.

  • Avatar
    Alexander Belyaev

    Hi !

    I'm sorry that I gave you incorrect information. Please add the following string to your AndroidManifest.xml :

    meta-data android:name="PW_NO_BROADCAST_PUSH" android:value=“true”
    

    My apologies once again. I look forward to hearing from you!

    Kind regards and Happy Holidays ! Alex.

  • Avatar
    craft

    Hi Alex,

    I am sorry it still doesn't work with <meta-data android:name="PW_NO_BROADCAST_PUSH" android:value="true"/> , the push shows and disappears immediately. By the way, we are using native app, not PhoneGap or other hybrid app. Thank you very much and Have a nice holiday.

    Best Regards, Tang

  • Avatar
    hamy

    Hi,

    I also have the same problem. I added <meta-data android:name="PW_NO_BROADCAST_PUSH" android:value="true"/> and it still doesn't work. I changed to <meta-data android:name="PW_NO_BROADCAST_PUSH" android:value="false"/> also does't work. Any luck?

    Thanks.

  • Avatar
    craft

    Hi Hamy, we had discussions with Pushwoosh team over Skype. here is their suggestion:

    Thank you for the information provided. In this case it is necessary to create your own receiver for push notifications received in foreground as per instructions below: http://docs.pushwoosh.com/docs/androidmanifestxml-modifications#using-custom-push-broadcast-receiver-in-android

Please sign in to leave a comment.