Help - Custom notification when app is killed or phone is in sleep mode

How can we show the custom notification UI from app when firebase notification is received and the app is killed or running in background or the phone is in sleep mode. Something similar to the alarm notification.