0

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?

Aswin
  • 1,154
  • 1
  • 11
  • 29
  • No. On old Android versions sure. On modern Android versions they've tried to prevent everything you're trying to do. If you want a persistent service, you must show a notification. – Gabe Sechan Apr 21 '20 at 15:18
  • Yes, but this is priva-app, so I though there would be any extra privileges. – Aswin Apr 22 '20 at 10:07

0 Answers0