For Android, the app is required to use a foreground service to process reliably notifications in the background.
Add FirebaseMessagingService to your Android project. This service allows your app to process the incoming push notification. Then use the foreground service to process the notification in the background.
When a push notification is received, the FirebaseMessagingService will be triggered, running the forground service.
In the foreground service, establish a connection with the Breez SDK to process the incoming payment.
Once connected, the app should wait for completion status from the Breez SDK that the payment has been received.
After confirming the payment, display a notification.
For a complete reference, see how we implemented it in c-breez wallet: BreezFcmService.kt.