4

I have an app using Firebase Notification and when the notification coming i want to open the application and get data from it. Now i'm using getLaunchIntent() to open app but it's only open when app is in backstack/running in background. If the app is not running, it doesn't open the app.

The problem listed here:

  1. When using getLaunchIntent() and application is running in background/foreground, it opens the app but the all data passed in getIntent() is null.
  2. When application is killed/not running, it doesn't open the app and no data is send.

I want to open app and get data from intent despite the app is in foreground/background/not running. The method getLaunchIntent() didn't pass any data if i want to open current app, it only pass data when i open other application. Any help is appreciated, thanks for help!

KENdi
  • 7,576
  • 2
  • 16
  • 31
  • try handling your notification data in @Override public void handleIntent(Intent intent) { super.handleIntent(intent); } simply use this overriden method in your firebaseMessagingService It will be called in each state Dead/Alive (you got it) – Adam Jul 27 '18 at 10:12

0 Answers0