Android Question Order of Execution on Startup?

DaGunster

Member
Licensed User
Bought license today to 8.50.
Started new project.
In the 'Starter' and in the 'Main', on every Sub, I put in a Log.
The goal is to watch what happens in the Logs tab on startup.
You can see the Log.Main.Process_Globals starts first.
The docs say this:
You can add a new service named Starter to an existing project and it will be the program entry point.

How can this be?

Log.Main.Process_Globals
Log.Starter.Process_Globals
*** Service (starter) Create ***
Log.Starter.Service_Create
** Service (starter) Start **
Log.Starter.Service_Start
Log.Main.Globals
** Activity (main) Create, isFirst = true **
Log.Main.Activity_Create First Time
** Activity (main) Resume **
Log.Main.Activity_Resume
 

KMatle

Expert
Licensed User
Longtime User
I see no problem here as the process global variables are (must) be initialized first as they are valid for the whole process. That's the way Android works. Services are a sub-part of the process like activities and come later. See the starter service as an automatic service which will be started automatically by B4a as a nice support. Nothing special here.
 
Upvote 0
Top