Hi All
Another newbie question.
I need to save the value of several status flags (INT) but NOT save all flags/settings. Reading through the StateManager tutorial gives me a clue but .... ?
Can someone please tell me if I'm on the right track?
1. Downloaded Erels zip file from the tutorial and added the Module StateManager.bas --- Success
2. Add code:
Sub Activity_Pause (UserClosed As Boolean)
...
StateManager.GetSetting ("Sound_Flag") As String 'Get the current value of Sound_Flag
StateManager.GetSetting ("Beep_Flag") As String 'Get the current value of Beep_Flag
StateManager.GetSetting ("Dollar_Flag") As String 'Get the current value of Dollar_Flag
StateManager.SaveSettings ' Saves the settings above
End Sub
Sub Activity_Create(FirstTime AsBoolean)
...
'Load the previous state
StateManager.SetSetting("Sound_Flag", Value As String) ' Sets Sound_Flag to the saved value
StateManager.SetSetting("Beep_Flag", ????????) ' Sets Beep_Flag to the saved value
StateManager.SetSetting("Dollar_Flag", ????????) ' Dollar_Flag to the saved value
End Sub
Please note the question marks, I have no idea what goes in "Value As String" when the value I need to restore is supposedly stored somewhere.
Thanks in advance
Regards Roger
Another newbie question.
I need to save the value of several status flags (INT) but NOT save all flags/settings. Reading through the StateManager tutorial gives me a clue but .... ?
Can someone please tell me if I'm on the right track?
1. Downloaded Erels zip file from the tutorial and added the Module StateManager.bas --- Success
2. Add code:
Sub Activity_Pause (UserClosed As Boolean)
...
StateManager.GetSetting ("Sound_Flag") As String 'Get the current value of Sound_Flag
StateManager.GetSetting ("Beep_Flag") As String 'Get the current value of Beep_Flag
StateManager.GetSetting ("Dollar_Flag") As String 'Get the current value of Dollar_Flag
StateManager.SaveSettings ' Saves the settings above
End Sub
Sub Activity_Create(FirstTime AsBoolean)
...
'Load the previous state
StateManager.SetSetting("Sound_Flag", Value As String) ' Sets Sound_Flag to the saved value
StateManager.SetSetting("Beep_Flag", ????????) ' Sets Beep_Flag to the saved value
StateManager.SetSetting("Dollar_Flag", ????????) ' Dollar_Flag to the saved value
End Sub
Please note the question marks, I have no idea what goes in "Value As String" when the value I need to restore is supposedly stored somewhere.
Thanks in advance
Regards Roger