when my app is being pushed to the background for example due to incomming call or sms, and then i load it back either from desktop icon or task manager,
any msgbox that was active on screen is gone
is there a way to make sure it will be returned complely to the same view as it was before the interruption?
if there was a msgbox on screen so the msgbox will still be on screen
thanks
how do i do it?
how do i store the entire current state and then return to it?
savig the active form and text in msgbox is not really doable i think
thanks
how do i do it?
how do i store the entire current state and then return to it?
savig the active form and text in msgbox is not really doable i think
Search the forum for KVS. Basically you use key/value pairs to save the relevant state of each view so that it can be restored later. It seems complicated at first, but when you look into it a bit deeper it's very straightforward. For a dialog, all you'd need to do is save the title, message & button configurations when the activity pauses, then fetch those back & use them to rebuild & display the dialog when the activity resumes.
Thank you Colin
It seems that this will force me to a lot of modifications. the app huge so it is a big pain.
I need either block any other thing from breaking my app (doesn't seem to be logic) or a magic solution so on resume it will be really resumed without loosing anything as happens now
Thank you Colin
It seems that this will force me to a lot of modifications. the app huge so it is a big pain.
I need either block any other thing from breaking my app (doesn't seem to be logic) or a magic solution so on resume it will be really resumed without loosing anything as happens now
You may not need to do that many code changes...
Create a module/class to call when the Pause event takes place, then go through all the Active Activity child views and child's child views and "save" the needed info, if important.
Then in the Resume event read back and re-set the activity state to its "original" state...
This will behave as a "snapshot" of the active activity, if you will
well pals, this is not really doable at least not in my case
the app is huge, lots of data on on mostly dynamic so i think this is a nice idea but not suitable
in any case - is this a system bug?
why on resume part of the functionality as message box displayed on screen is gone?
that does not make any sense at leat to me...
as i need a solution for this
is there a way to prevent this "odd" behaviour?
thought on alternative:
can any one help on how to create a dynamic/programatically created form/panel that will have a label and 2 buttons to act as the msgbox and replace it?
this may be working as form / panels are not lost on resume
best will be that the form will not cover the entire screen and leave the form bellow shown
i hope i made my idea clear
when my app is being pushed to the background for example due to incomming call or sms, and then i load it back either from desktop icon or task manager,
any msgbox that was active on screen is gone
is there a way to make sure it will be returned complely to the same view as it was before the interruption?
if there was a msgbox on screen so the msgbox will still be on screen
Not necessarily. If the Panel (or whatever view he uses) is not visible by default & the OS kills the app while it's in the background, then the app (& the UI) will be resumed in its default start-up state - meaning the Panel won't be visible.
Not necessarily. If the Panel (or whatever view he uses) is not visible by default & the OS kills the app while it's in the background, then the app (& the UI) will be resumed in its default start-up state - meaning the Panel won't be visible.
Any idea how to create such floating panel?
That will not cover the entire screen and be on top of the previous panel yet showing it?
And to create it on the fly programmatically?
Any idea how to create such floating panel?
That will not cover the entire screen and be on top of the previous panel yet showing it?
And to create it on the fly programmatically?
XUI Views is a b4x library (https://www.b4x.com/android/forum/threads/100383/#content). The same b4xlib library is compatible with B4A, B4i and B4J It is a collection of custom views and dialogs. Everything is written in B4X. The source code is included inside the b4xlib file, which is a zip...
No as it is based on a secondary view and that breaks the flow
Look at the sample I've uploaded and the explanation it will all be clear as per what I need