Thank you
I did that, this is the log (my comments starting with ' )
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (tracker) Create ***
** Service (tracker) Start **
Timer : 18:09:53
Locationchanged: 18:09:54
Timer : 18:09:54
Locationchanged: 18:09:55
' ...
' Screen goes black, I wait a little
Locationchanged: 18:10:45
Timer : 18:10:45
Locationchanged: 18:10:46
** Activity (main) Pause, UserClosed = false **
Locationchanged: 18:10:47
** Service (starter) Destroy (ignored)**
** Service (tracker) Destroy **
I try to force a restart, add 1 line:
Sub Activity_Pause (UserClosed As Boolean)
If (UserClosed=False) Then Activity_Resume
End Sub
Locationchanged: 18:28:51
Timer : 18:28:51
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (activity_permissionresult)
' I restart the screen and look at the table
** Activity (tabelle) Create, isFirst = false **
** Activity (tabelle) Resume **
Locationchanged: 18:28:52
Locationchanged: 18:28:53
Locationchanged: 18:28:54
Locationchanged: 18:28:55
Locationchanged: 18:28:56
Locationchanged: 18:28:57
Locationchanged: 18:28:58
Locationchanged: 18:28:59
Locationchanged: 18:29:00
Locationchanged: 18:29:01
Locationchanged: 18:29:02
Locationchanged: 18:29:03
Locationchanged: 18:29:04
Locationchanged: 18:29:05
Locationchanged: 18:29:06
Locationchanged: 18:29:07
Locationchanged: 18:29:08
Locationchanged: 18:29:09
Locationchanged: 18:29:10
Locationchanged: 18:29:11
Locationchanged: 18:29:12
Locationchanged: 18:29:13
Locationchanged: 18:29:14
Locationchanged: 18:29:15
** Activity (tabelle) Pause, UserClosed = true **
running waiting messages (1)
** Activity (main) Resume **
** Service (tracker) Start **
** Service (tracker) Start **
Locationchanged: 18:29:16
Timer : 18:29:16
Locationchanged: 18:29:17
Timer : 18:29:17
Locationchanged: 18:29:18
Timer : 18:29:18
' ...
Timer : 18:29:49
Locationchanged: 18:29:50
Timer : 18:29:50
Locationchanged: 18:29:51
** Activity (main) Pause, UserClosed = false **
' log stops. I wake up the screen
sending message to waiting queue (activity_permissionresult)
Locationchanged: 18:29:52
running waiting messages (1)
** Activity (main) Resume **
** Service (tracker) Start **
** Service (tracker) Start **
Timer : 18:30:39
Timer : 18:30:40
Locationchanged: 18:30:41
Timer : 18:30:41
Locationchanged: 18:30:42
So ... with this change the system restarts as soon as the screen is not black and I have logged in on my cell. But this is not enough, think of all the fitness trackers which run all the time during a session, black or not.
Can I try something else?