App is not working when lockscreen is on

Please help with the following problem:
I have developed an emergency app that works perfectly on mobile phones when connected to the AI companion, even when the lock screen is switched on. After installation on the phones, the app only works in the active state, but not when the lock screen is on. The timer function "TimerAllwayFires" is activated.

Is your app a foreground or background app or you use a routine to keep the app active? If it isn't one of those three situations, your app will only work when the app is active. When the app 'goes to sleep' you get the observed behavior on your phone.

What exactly is your app trying to do in the emergency case?

Taifun

At an individually adjustable time, alternatively also in the event of excessive movement of the mobile phone (AccelerometerSensor), an alarm tone is played on the mobile phone. If this is not stopped after a certain time (e.g. 3 minutes), an SMS is sent to contact persons with information on the respective location (Location Sensor). The respective permissions on the mobile phones were granted.

The alarmmanager extension is able to start your app at a given time. To play a sound and to send an sms is also possible behind the lockscreen.. I already built a similar app, so I know, what I'm talking about... To get the location in the background, you might want to use additionally the locationservice extension.

To play a sound after excessive movement in the background try the itoo extension

EDIT: for a small example see also here

Taifun