I have a fairly large app (B4A no B4APage).
The problem is that I get the feeling that when the phone goes into inactivity, the activity variables are lost, both in the activity itself (understandable), and the assignments I have made to pass the value to another activity.
That said, the question is:
Is it correct to use a public variable in an activity (the app is not B4XPAGES, and I cannot transform it) and make assignments of this variable to other activities.
Something like
ACTIVITY1:
type DATATYPE(x as string, y as string, etc)
PUBLIC X AS DATATYPE
....
ACTIVITY2.XCOPY = ACTIVITY1.X
startactivity (ACTIVITY2)
Or would it be better to ALWAYS put these variables in a MODULE as public and solve it?
If activity1 is destroyed, do I lose the value in activity2?
and if so, I'm almost sure.
Is the solution to CLONE all the values from one activity to another or perhaps as I said, pass that value to a module as public variables?