Android OnMessage not working

Hello,

I am having an issue with push notifications. I have setup a custom receiver and push service but the onMessage() method is never called. I see the notifications that the device is registered but still nothing when I am supposed to receive a notification. Once I make the return value to true, use default method, everything works fine. I need to have my own custom logic to handle notifications based on whether the app is open or not. Can anyone please help me? I have followed each step so closely and the only thing not working is the onmessage() method.

Thanks.
Drew

Hi Drew,

Have you looked into this doc: https://github.com/Backendless/Android-SDK/blob/master/docs/push.md ?

Yes and everything works until I make it return falsemail. Which is what I though I was supposed to do when I wanted to add my own handler. I never get the toast for onmessage. I get the toast for registered.

If you return false, then the message is not shown - it’s the expected behavior.

I’m confused, I thought you had to return false in order to implement your own logic. I copied the code from the guide and I don’t get the message

See the code right here. If onMessage returns true, then the notification is shown.