| fe278674 | 03-Jan-2022 |
islamouzou <[email protected]> |
[location] Make removing sticky notification on app killing optional (#15633)
# Why
In order to make background location more felxible we should give a choice to developers whether or not the for
[location] Make removing sticky notification on app killing optional (#15633)
# Why
In order to make background location more felxible we should give a choice to developers whether or not the foreground service should be killed when the app is killed . i personally found this a show stopper . i for example have a cab booking system where i must show the driver that i'm using his location even when he kills his app .
Following this PR #11775 i was able to make this optional .
# How
I've added a boolean option "killServiceOnDestroy" to LocationTaskServiceOptions which will be passed to the LocationTaskService Intent through extra params , if it's true the foreground service will dissapear on app killing .
# Test Plan
Try starting background location and killing the app from the task manager. if killServiceOnDestroy is true The notification should be destroyed , otherwise it'll stick .
show more ...
|