App Keep alive always

I'm sorry, but I haven't fixed the problem. The extension will not work. I have only added instructions to prevent the crash and provide more information about the problem. This in reference to the previous posts regarding ADB.

Overnight I thought of a way to display the log messages on the cell phone screen. Unfortunately, I won't have time to take care of this again until this afternoon.

I have enhanced the extension so that the log can be output via events.

The sample project collects these events and displays them on the screen. The entire log can be sent to me by e-mail using the button. If everything would work you would get an output like the one in the picture. But probably (and hopefully) error messages will also appear.

https://ullisroboterseite.de/_forDownload/Update-UrsAI2KeepAlive.zip

2 Likes

I have received an answer. A permission was missing. I have added it.

Please try again. Note: For it to work, you must first press “Start Keep Alive Service”. Then the process is logged and displayed in the text field. The content of the text field can then be sent by e-mail.

https://ullisroboterseite.de/_forDownload/Update-UrsAI2KeepAlive.zip

1 Like

Ok, now no errors

But I tried the TintyDB test again.
During screen off the clock.timer stopped and nothing wrote to TinyDB

This one: FOREGROUND_SERVICE_SPECIAL_USE

But why isn't this needed for your MediaNotification extension?

As I said, add a Player and play a silent sound while the app is running to establish a wakelock. I checked it and it should work to keep the timer running also in idle mode.

I don't think it's working properly, at least not the FGS. But nobody notices because the app doesn't freeze.
Internally, an exception will probably be thrown that causes the service to crash, but not the main program.

After KeepAlive is working, I'll have to take another look at it.

1 Like

I tried, but timer doesn't run with screen off, nor playing a video in loop.
Samsung A23 Android 14

It looks like I have a working version. Thank you for your patience and your help!

I will create and publish a usable version of the extension soon. Unfortunately I can't do it today. I will get back to you when it is ready.

Thank you !!!!!!

Try this one: (EDIT: APK removed)

After 7 min in idle mode (screen locked)

After more than 30 minutes is yet running.............can you post the .aia file ?

This is all you need to (establish a wakelock automatically using the Player comp.):

1 Like

The clock.timer works even if screen is off, but TinyDB.StoreValue do not work with screen off.
So, what components work with screen off ? Only timer ?

:question:

Which result do you expect?

TinyDB works fine, try this:

Every 30 seconds the time value has to be recorded in TinyDB and written to TextBox1.
During screen off, the time value is written to TextBox but not recorded in TinyDb

Why ?