pusher / docs

The all new Pusher docs, powered by @11ty and @vercel
https://pusher.com/docs
8 stars 15 forks source link

Pusher Beams Docs | Kotlin & Java Client SDKs for Androidpage #293

Closed bqfa closed 5 months ago

bqfa commented 1 year ago

Hello there, I spotted an issue on https://pusher.com/docs/beams/reference/android/

I didn't get custom push notification payload when app is closed. When app is not in foreground onMessageReceived not called.

override fun onMessageReceived(remoteMessage: RemoteMessage) { Log.i("NotificationsService", "Got a remote message 🎉") // TODO: Do something useful here }

benw-pusher commented 5 months ago

You may need to review https://pusher.com/docs/beams/guides/handle-incoming-notifications/android/#handle-all-notifications - this mentions:

When your application is in the background this service will not be called unless there is only a data payload in the notification. The notification key cannot be used.

If you follow the instructions in that guide you should be able to implement what you are looking for.