My project is in Java, Min API 19, Target API 30.
I have a foreground service, and a handler inside it. The handler runs its code every half second. Under ce