Android Question Activity.finish is not executed

grafsoft

Well-Known Member
Licensed User
Longtime User
For testing reasons, I wrote a code like this:

B4X:
Sub Activity_Create(FirstTime As Boolean)
   ...
   StartActivity (Synch)
   Activity.Finish
   ' here the activity synch should start to run
   
   Basis.debuginfo ("Before stay=" & stay & " Script=" & script,False)
   If stay = False Then
     Basis.debuginfo ("should start activity camera",False)
     If script="Draw/" Then StartActivity (Draw) Else StartActivity (Kamera)
' but I see that activity Kamera starts
     script=""
     Activity.Finish

Why???

Thanks

Peter
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Activity.Finish as well as StartActivity send a message to the internal message queue. Once the message is processed the activity will be finished or the next activity will be started.

You should add a Return call if you don't want to code to be executed.
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…