An Android app part of core applications installed under /system/priv-app/. This app must show UI on top of all screens when vehicle mode is changed to Reverse. So I defined a sticky service which will be running in background to listen events and show UI on screen (used SYSTEM_ALERT_WINDOW).
While doing sanity testing, and UI is showing, lowmemorykiller
killed my service and UI is gone, which is not expected behavior.
As per guidelines, I must not use persistent=true
in manifest.
I wonder, why lowmemorykiller has killed my service which is active on screen?
If that was an expected behavior, then is there a way that I can define a sticky service as a foreground which will start on boot and do not show a notification?