Android Question Startactivity problem

grafsoft

Well-Known Member
Licensed User
Longtime User
Hi,

I need 3 activities to perform one after the other.

B4X:
' I want SMS to start and finish and then return to tle line wwith "Galerie"
StartActivity (SMS)
' What I want happened. Now I waht Galerie to start and finish
StartActivity (Galerie)
' but I get directly to the next line
if (...) then
   StartActivity (Upload)
end if

I hope I made myself understandable. I want the activities to start, finish and then the next to start.

Thank you
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
StartActivity sends a message to internal message queue. Only later when the main thread is free to process the message queue the activity will be started.

This means that your code above cannot work properly.

You need to start the first activity and later from that activity start the next one. Note that you can use CallSubDelayed to start an activity and pass paramaters to that activity.
 
Upvote 0
Top