How Google calendar or Instagram make their apps all the time up and running even after force stop

前端 未结 6 1511
無奈伤痛
無奈伤痛 2021-02-05 09:24

Looks like force stop should prevent app from running and it\'s even disable all app\'s alarms. However I found that notification in Google Calendar still shown fine even after

6条回答
  •  梦谈多话
    2021-02-05 10:13

    Just to add with Sagar Damani's answer, A service call is required to run your long operation in background but they also run in sepearate processes. When you declare a service or an activity in the androidMenifes.xml, also add the android:process="" attribute. Therefore, it will always be persistent if the user kills/force stop the activity.

提交回复
热议问题