0

I want to apply full notification like Whatsapp incoming call to our phone. But I can't do that when my android apps is in the background state.

This is my build.gradle

minSdk 23
targetSdk 32

I have tried to use Broadcast Receiver and Foreground Service but it only works when application is on the foreground state.

Thank you

  • Did you read the [documentation on time-sensitive notifications](https://developer.android.com/training/notify-user/time-sensitive)? – ianhanniballake Apr 18 '22 at 18:17
  • Yes I do, but I only shows Heads Up notification, what I want is a full screen notification like Whatsapp incoming call – Deka Thomas Apr 19 '22 at 08:20
  • so your issue is unable to receive notification in background state? from which platform you are sending the notification? – Ankit Apr 19 '22 at 12:37
  • Yes @Ankit I can't receive notification in my background state, I have tried 2 devices those are with API 29 and API 27 – Deka Thomas Apr 19 '22 at 14:36
  • 1
    https://stackoverflow.com/a/40083727/7248394 check this. – Ankit Apr 20 '22 at 05:58
  • Owh I just realized that I use "notification" type payload to send the push notification where it means the System Tray will receive that notification. I will try to change it into "data" type. I'll inform you the result. Thanks for the information @Ankit – Deka Thomas Apr 20 '22 at 06:41
  • Thank you, now my Firebase can receive notification in background state – Deka Thomas Apr 20 '22 at 18:00
  • Try to change your ```firebase_messaging``` to latest version and this follow the implementation. – YourDeveloper Dec 01 '22 at 22:10

0 Answers0