I want to create a background service in my app which will be started at device boot. I read some questions here on SO, but I didn't find a good solution.
I'm thinking to WhatsApp, which runs a background service to check if there are new messages, also with app closed or not yet opened (from boot).
I want to write code only once for both android and ios. In this background service, I need to check if there are new contents (every 5 minutes do a http request) and if firebase sends a cloud message to create a notification in the app.
I read this question and those linked, but I would to have here in this question the complete step-by-step guide to do what I want.
Now, in my app, I have only ChangeNotifierProvider and Consumer to fetch http data and place them in the widgets. I think that in background process I can run ChangeNotifier subfunctions.
What you advice?