Hello,
I have an Android app that flashes Wi-Fi addressable lightbulbs when I receive a phone call.
It's based on the Taifun Notification Listener extension.
It works great for about the first hour or two, but after six hours or so it stops working. Sometimes I'll just have the phone start up to its lock screen, log in, or open the app and restart service and it will start working again.
I am running on a phone running Android 11. I know Android has become more aggressive in killing running processes – even services. I have a feeling that after a while Android kills the background service or the phone goes into a deep sleep mode that causes notifications not to be recognized.
Can anyone describe what is actually happening? Is there way to work around it? – Maybe setting something in Settings or setting a flag in the app?
Thanks for your help.
Barry.