Resume App After StartActivity

margret

Well-Known Member
Licensed User
Longtime User
Hello,

In my program I open the brower on the device and pass a URL to the browser. All is fine at this point. When I close the brower my program has just stopped. Still there just will not continue to run the next statements that follow in the Activity_Create. How can I get my program to continue where it left off. I entered under Activity_Resume to call Activity_Create(False), but it just start over instead of picking up where it left off. Any Ideas?? The next line tell it to open the email and pass info into it. I open the browser with:

B4X:
Dim openbrow As PhoneIntents
StartActivity(openbrow.OpenBrowser("http://www.google.com"))

Thanks,

Margret
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
StartActivity call doesn't start the next activity immediately. The browser activity will only start after your program finishes its current code execution. In your case it should finish running Activity_Create, Activity_Resume and then Activity_Pause. Later when you return to your application code execution will start from Activity_Resume (or Activity_Create if the process was killed).

You can see these steps happen in the logs.
 
Upvote 0

margret

Well-Known Member
Licensed User
Longtime User
Resume Main Activity

StartActivity call doesn't start the next activity immediately. The browser activity will only start after your program finishes its current code execution. In your case it should finish running Activity_Create, Activity_Resume and then Activity_Pause. Later when you return to your application code execution will start from Activity_Resume (or Activity_Create if the process was killed).

You can see these steps happen in the logs.

Hello Erel,

Thanks for the info. I had to use a few flags because of the code I have but it works great now. Thanks for your explanation of how this works..! Good Stuff!:sign0098:

Thanks,

Margret
 
Upvote 0
Top