How long will the device stay awake when it receives a FCM high priority message?

孤街醉人 提交于 2019-12-06 09:27:10

Yes, you should defer the downloads but that depends on the nature of your app. Docs say that high priority messages give the app temporary access and as such it is not guaranteed that your image download will actually finish in that window.

Are your app message time sensitive (i mean would the world crumble if the user sees them after 10 minutes)? If not then you should exactly follow your own suggestion. Else may be you can start a foreground service which might prevent the device for being going to doze mode (Be aware your app might drain a lot of battery and eventually this might create a negative impression on the user).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!