Android GcmListenerService parallel?

烈酒焚心 提交于 2019-12-11 16:08:18

问题


Does the GcmListenerService process the gcm messages in parallel or sequentially? I know that normal Android services run in the main thread. But does that also apply to GcmListenerService?


回答1:


GcmListenerService processes messages in parallel in background threads, see the note in the docs that methods are invoked asynchronously. So you are able to do blocking tasks in onMessageReceived() without worrying about blocking future messages.



来源:https://stackoverflow.com/questions/35219490/android-gcmlistenerservice-parallel

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