Is there a way to store app notifications in a flutter app. Most of the time this app will be closed and the app notifications will not directly be hitting the app. I would like to store app notifications in a notifications received section. I know I can get the notifications if the app is opened, but for if the app is closed and it just shows as a status, I can't get them in the device unless the user clicks on the notification message. and it opens the app. What options do I have and is what I am wanting to do even possible?
-
I've been looking for a solution for this problem and I got nothing. Could you finally find a way to do that? – Raad Feb 16 '21 at 14:07
2 Answers
First interpretation of your question: If I read your question correctly, you're saying its not possible to have text in your notifications when the app is not open. This is definitely possible, almost all your apps create notifications on the device with more than just 'status'.
Another interpretation of your question: In response to a firebase cloud messaging message, you might want to save data or do some other background task, instead of just creating a notification the user sees. This is not enabled by default. There's lots more instructions on enabling and using this in the README
By default background messaging is not enabled. To handle messages in the background:
The golden nugget of information is _firebaseMessaging.configure(onBackgroundMessage: yourBackgroundMessageHandler)
which is not listed under the receiving messages section.
Let me know if I misread. What do you mean by status?

- 22,056
- 10
- 114
- 167
You can use background Fetch to make the app stay in the background. The package will awaken an app in the background about every 15 minutes.

- 454
- 1
- 6
- 14
-
Maybe I am dense, but I don't see how is that going to allow me to get the device notifications. however background fetch is something I was not aware of, so thanks for that information. – Jeremiah S. May 04 '20 at 16:52