Android Question Main activity created twice ?

wl

Well-Known Member
Licensed User
Longtime User
Hi,

I'm developping an app that contain (amongst other things) a main activity and a service.

As soon as I started the application it seems it starts both the main activity and the service twice ?
I can't figure out the reason for this.

I found a similar thread: http://www.b4x.com/android/forum/threads/firsttime-is-executed-several-times.26385/#post-152759

Strange thing is that it only occurs when I run it on my Phone (S3) through the B4A bridge, but NOT when running in the emulator ?

Thanks

B4X:
Installing file.
PackageAdded: package:b4a.example
** Activity (main) Create, isFirst = true **
** Activity (main) Create, isFirst = true **
11:32:54 - Main.Activity_Create
11:32:54 - Main.Activity_Create
** Activity (main) Resume **
** Activity (main) Resume **
11:32:54 - Main.Activity_Resume
11:32:54 - Main.Activity_Resume
startService: class b4a.example.service_main
startService: class b4a.example.service_main
startService: class b4a.example.service_main
startService: class b4a.example.service_main
** Service (service_main) Create **
** Service (service_main) Create **
11:32:55 - Service_Main.Service_Create
11:32:55 - Service_Main.Service_Create
** Service (service_main) Start **
** Service (service_main) Start **
11:32:55 - Service_Main.Service_Start
11:32:55 - Service_Main.Service_Start
 
Last edited:

wl

Well-Known Member
Licensed User
Longtime User
I just created a new application.

Just a single activity (main) with a button, that's it...

Guess what ?

** Activity (main) Create, isFirst = true **

Appears twice as well ? (when connecting through B4A bridge to my S3)

UPDATE: it only occurs when running the application in debug mode ?
 
Last edited:
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
Hi Erel,

Thanks for the info. Just FYI: I'm running B4A 2.71 and B4A bridge 2.08
 
Upvote 0
Top