Android app not receiving Firebase Notification when app is stopped from multi-task tray

前端 未结 6 1540
长发绾君心
长发绾君心 2020-11-21 10:14

I have read a similar question on SO, however, I was not able to get the correct answer from it.

I have a system wherein we send notification to around 500 devices.<

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-21 10:43

    Have you tried to use stopWithTask attribute on your service class?

    
    

    If set to true, this service with be automatically stopped when the user remove a task rooted in an activity owned by the application. The default is false.

    If the flag is false, there is an onTaskRemoved callback in your Service class.

    In the case you can detect the "swipe" event, and you can implement a workaround.

提交回复
热议问题