1

I am reading this tutorial about firebase cloud messagging (Push Notifications) and I fail to find any info with regards to the most basic concept in Fire base push notifications.

When my app is closed, how does firebase activate back my app? And which service actually activates it?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
user1034912
  • 2,153
  • 7
  • 38
  • 60

2 Answers2

1

Google Play Services must be installed and for these "background data" need to be permitted. This means, an app doesn't receive the notification directly, but it is being pushed into a notification channel, with an optional launch Intent ...of the app that is supposed to be launched on tap.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216
0

For Firebase Cloud Messaging (Push Notification):

  • When will the push notification be shown:

    • Foreground: no

    • Background: yes

    • Not Alive: yes

  • When will "onMessageReceived()" be called:

    • Foreground: yes

    • Background: if has data

    • Not Alive: if has data 【and user click on the notification】

Sam Chen
  • 7,597
  • 2
  • 40
  • 73
  • I know about onMessageRceived(). But what is called when "push notification" back ground arrives? – user1034912 Sep 10 '21 at 15:49
  • The `onMessageRceived()` may be called, may not be called, you can check out this: https://stackoverflow.com/questions/40311279/firebase-onmessagereceived-not-called-when-app-is-in-the-background – Sam Chen Sep 10 '21 at 17:33