iOS Question B4XPage App gets killed/Restarted when it goes to background

walterf25

Expert
Licensed User
Longtime User
Hi Everyone, is there a way to prevent a B4i app to either get killed or get restarted after the app is put in the background, let's say a user is using the app and either a phone call comes in, or the user needs to open a different app then goes back to the previous app.

I have a B4Xpages app that if I turn off the screen for a few seconds, then I turn the screen back on, the app gets taken back to the B4XMainPage, is there a way to have the app stay in the current page/screen?

Thanks,
Walter
 

walterf25

Expert
Licensed User
Longtime User
1. You can get about one more minute with this code: https://www.b4x.com/android/forum/account/alerts

2. Store the program state (with KVS or any other method) in B4XPage_Background and load it in B4XMainPage.B4XPage_Create
Sorry which code Erel, your link takes me to my account's alerts.

So, is this part of the iOS system, I supposed this is by design? gotta hand it to Apple for making things so overcomplicated šŸ˜©
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
1. You can get about one more minute with this code: https://www.b4x.com/android/forum/account/alerts

2. Store the program state (with KVS or any other method) in B4XPage_Background and load it in B4XMainPage.B4XPage_Create
Also, one thing I didn't make clear on my first post is that the app gets completely killed, meaning if I leave the app long enough in the background, when I come back to it, the mainpage also gets destroyed, I just realized the B4i-Bridge app stays in the foregorund no matter how long I let the screen off.

Any work around for my app.?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top