I read in the Firebase docs that a device will be brought out of sleep if it receives a high priority message from FCM and that the network connection will be opened towards the app server. I have tested this behaviour and i know that it does wake a device from doze.
My use case is such that i need to download an image using a set key in the data tag of the push message. There will be multiple such push notifications and i will be saving all these messages in a db.
After say ten minutes, the notifications will actually be triggered onto the user's screen in order to avoid the multitude of other notifications user has received on immediately turning on the network connection.
My question essentially is:
Will the device be awake long enough for me to download the image and save it to the db (image size is max 100kb)?
Or should I instead defer the downloads to a later time using JobScheduler API in order to ensure network connectivity?