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

Discussion in 'Android Questions' started by junaidahmed, Jun 1, 2019.

  1. junaidahmed

    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....
    Code:
    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
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    What happens with this code?
     
  3. junaidahmed

    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....
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice