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.
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.
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.
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 ?
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