Persistent data store. What should I use?

2 posts, 0 answers
  1. Young
    Young avatar
    13 posts
    Member since:
    Nov 2013

    Posted 26 Nov 2013 Link to this post

    Hi, I'm very new to hybrid app development using Kendo Mobile. Here's what I'm trying to do...

    1. pass username/password encrypted token to API server and get api_key
    2. Store api_key on mobile device somewhere and use that key to authenticate every http request to the API server.

    Now, where should I store the api_key?

    I'm thinking of storing that api_key in LocalStorage ( But how does this work when converted as Android or IOS app?
    Will it still use localStorage? or convert to some other datastore that I'm not sure of in native world?

    Any recommendation? or best practices?
    *ps: api_key should be persistent even when closing the native app, so that user don't need to login again everytime they open the app.
  2. Steve
    Steve avatar
    10940 posts

    Posted 28 Nov 2013 Link to this post

    Hi Young,

    Using localstorage is a good choice if the user should not authenticate everytime. LocalStorage (being HTML 5) is widely accepted and supported on both Android and iOS. The js to native wrapper that is used in Icenium (Cordova) allows for easy access to it via the window object. Check this help article for more information.

    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
Back to Top