Osmosys Osmosys

Osmosys Osmosys

  • NA
  • 13
  • 13.5k

phonegap,backbone.js and cordova

Apr 21 2014 9:09 AM
 HI , i developing  a android app using backbon.js  and need to   kept user details in sessions  or local storage ,  i am using the following code to  save the data in localstorage 
 window.localStorage.setItem("ICName", data.ICName);
                        window.localStorage.setItem("ICID", data.ICID);
                        window.localStorage.setItem("IAID", data.IAID);
                        window.localStorage.setItem("ialastname", data.ialastname);
                        window.localStorage.setItem("iafirstname", data.iafirstname);
                        window.localStorage.setItem("IAPhone", data.IAPhone);
                        window.localStorage.setItem("IAEmail", data.IAEmail);
                        window.localStorage.fax("fax", data.fax);
 and  i am trying to retrive them in other page   like this 

  $('#txtAdusterName').val( window.localStorage.getItem("iafirstname") + window.localStorage.getItem("ialastname"));
            alert('Session  ' + window.localStorage.getItem("iafirstname") + window.localStorage.getItem("ialastname"));
            $('#txtadjusterphone').val(window.localStorage.getItem("IAPhone"));
            alert('Session  '+window.localStorage.getItem("IAPhone"));
            alert('Session  ' + window.localStorage.getItem("IAEmail"));
            alert('Session  ' + window.localStorage.getItem("ICName"));
            $('#txtAdjusterEmail').val(window.localStorage.getItem("IAEmail"));
            $('#txtCompany').val(window.localStorage.getItem("ICName"));
     
The problem I am facing is,when it was run on any browser it was working fine.  I was able to get the data from local storage. But when  it was installed in a phone(android) it was not getting the data. I also used SessionStorage("KEY","Value"). Can any one help to get out of this?   Thanks in advance......