0

I have create a firebase account and linked with my android app

In android app, it will show a notification whenever i update a record in firebase realtime database console.

when app is running at that time when i add new record from firebase realtime database console its showing notification.

but when i close the app and removed from the recent opened list then not able to get the notification.

how i can get notification when app is closed and removed from recent opened list.

please guide me how i can accomplish it.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Cubes
  • 1
  • 1
  • See http://stackoverflow.com/questions/39504805/android-app-not-receiving-firebase-notification-when-app-is-stopped-from-multi-t – Frank van Puffelen Apr 29 '17 at 13:54
  • @FrankvanPuffelen from that question its not clear that whats the reason its not receiving notification when i swipe from the tray. can u help me out ...any suggestion on that, my notification is called by only onDataChange whether i need to integrate onMessageReceived also? – Cubes Apr 29 '17 at 14:18
  • Ah, I missed that you used only the Firebase Database. Sorry about that. The connection between the Database client in the app and the Firebase servers, will definitely be closed when the app is closed. In fact it may already be closed long before that by Android when the app isn't active. You should not rely on the Firebase Database for receiving notifications when your app isn't active. See http://stackoverflow.com/questions/42606370/firebase-read-data-in-background-android – Frank van Puffelen Apr 29 '17 at 14:27

0 Answers0