Android Question How to use State Management to Save and Restore key value

junaidahmed

Well-Known Member
Licensed User
I have used State Management to Save and Restore key value.I have tried below code but its not working.Please check below code and advise how to do this....
B4X:
Save Setting:-

Sub CmdAdd_Click
   
    StateManager.SetSetting("MobileNo",TxtMobileNo.Text)
   
End Sub

Get Setting :-

Sub Activity_Create(FirstTime As Boolean)
TxtMobileNo.Text = StateManager.GetSetting2("MobileNo","9894066451")

End Sub
Note:-

Where TxtMobileNo.Text is Edit Text
 

junaidahmed

Well-Known Member
Licensed User
Actually I am trying to save Mobile Number When I click on Button and get the key value when Activity Start....
 
Top