0

While the app is in the background and you're receiving a push notification with both the notification body and the data inside. The push isn't received onMessageReceived. Instead it is sent to the device's system tray where it waits for the user's click. The default behaviour of this click will call the onCreate method of the launcher activity, as if the app is restarting.

User tap open app launcher by default

Is there anyway to override this behaviour and just open the app normally

sam winston
  • 162
  • 1
  • 13
  • Possible duplicate of [Trying to understand the default firebase background notification exceptions](https://stackoverflow.com/questions/48291651/trying-to-understand-the-default-firebase-background-notification-exceptions) – Peter Haddad Jan 17 '18 at 12:23
  • @PeterHaddad I deleted the previous question. This one is more specific – sam winston Jan 17 '18 at 12:25
  • I found the solution. https://stackoverflow.com/a/23125638/5310148 – sam winston Jan 17 '18 at 23:10
  • U could use pending intent to take the user to a specific activity – Peter Haddad Jan 17 '18 at 23:28
  • @PeterHaddad I can't build these types of background notifications. They are sent with an intent filter of Launcher by default, or I will need to control that from the payload, which I wanted to avoid – sam winston Jan 18 '18 at 01:11

0 Answers0