So what I want to achieve is notify the user whenever a new order is received by showing a pop up at the top of the screen with a custom dialog to accept/cancel the order. This pop up should open even if the app is not running.
Order notifications are received through FCM and captured in onMessageReceived of FCM.
I am able to show notifications and play custom notification sound but I am not able to find a way in which I can show the pop up(Custom Dialog) to the user.
User states can be:
- Phone locked and kept idle
- May be on a call
- Using another app
- Using the same app but still show the pop up
So I want the order pop up to be the highest priority so that it either gets accepted/cancelled within seconds the customer has ordered