When I first compiled my program in Release mode, I immediately noticed that the Main activity restarted by itself without my program doing anything. I checked all Timers, SQL, etc and could find no reason. I then tried compiling a B4A Sample-Auto Scale and found the same problem. I then created a New B4A App that contained only the Log(datetime) statement; same thing. The only way around this seems to be, put a counter in the Starter service, add one to it on Activity Resume and display a Splash Screen until the second resume happens; unfortunately it takes 13 to 17 seconds.
My S8 runs Android 8.0, and this behavior does NOT happen in debug mode. On my Fusion5 - Android 6.0, it doesn't happen at all, either debug or release.
Can anyone offer an explanation?
Regards
Ed Sharp
My Large Complex Program
========================
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Resume: 12:58:12
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
Resume: 12:58:26
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Auto Scale Example
==================
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Resume: 12:52:53
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
Resume: 12:53:13
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Program with only Log instruction
=================================
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Resume: 01:05:30
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
Resume: 01:05:45
My S8 runs Android 8.0, and this behavior does NOT happen in debug mode. On my Fusion5 - Android 6.0, it doesn't happen at all, either debug or release.
Can anyone offer an explanation?
Regards
Ed Sharp
My Large Complex Program
========================
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Resume: 12:58:12
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
Resume: 12:58:26
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Auto Scale Example
==================
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Resume: 12:52:53
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
Resume: 12:53:13
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Program with only Log instruction
=================================
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Resume: 01:05:30
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
Resume: 01:05:45