I'm using Firebase messaging for push notifications in my Android app.
It's well known that onMessageReceived
is not called when app is in background and the message includes 'body' and 'title'
This is an issue because, when app is resumed by user (simply bringing the app in foreground from task list), I can't figure out how to know that it's time for the app to refresh its data.
I could always have the app try to get data when comes into foreground, but ideally I wanted to rely on push notifications.
What is the best practice to refresh the data?