I have a problem:
In the main activity I create and initialize an object.
I then have 2 activities:
----> Dashboard Activity
(Use the Constants class values)
----> Secondary Activity
(Use the Constants class values)
If the Secondary activity was in the top and for some reason the App goes to the background sometimes the Android destroys the second activity.
Then when the application is restored the dashboard activity goes to the top, but the constants are now null values and activity dashboard crashs.
Thank you.
In the main activity I create and initialize an object.
B4X:
sub Process_Globals
'Constants
Dim Constants as class_constants
end sub
Sub Activity_Create (FirstTime As Boolean)
'Constants
Constants.Initialize
end sub
I then have 2 activities:
----> Dashboard Activity
(Use the Constants class values)
----> Secondary Activity
(Use the Constants class values)
If the Secondary activity was in the top and for some reason the App goes to the background sometimes the Android destroys the second activity.
Then when the application is restored the dashboard activity goes to the top, but the constants are now null values and activity dashboard crashs.
Thank you.