javascript - what is the best (simplest) way to store the state of a check box for seven days on phones without using local storage -


i building simple app should store state of switch / checkbook period of 7 days. issue have website using build said app doesn't accommodate local storage on phones. yet simple way store switch / checkbook state without doing through local storage or linking online database haven't simplest clue of how manage or set let alone create database. code options have available work html, css , javascript website using buildfire.

so i've built many apps on buildfire. here comments:

  1. you can use localstorage on plugin. however, multiple instances of plugin share same localstorage need aware of , give variables distinct name prepending them instanceid

  2. you know datastore read-only on device. should use userdata (ref: https://github.com/buildfire/sdk/wiki/user-data:-save-user-data-from-the-widget) allow save state per user per instance , cross device. used datastore yet allows user write own profile

buildfire.userdata.save (   {checked:true} ///obj save   , usertoken /// logged in user token   , function(err,result){ ///callback     } ) 

keep in mind need have user logged in. can auth api https://github.com/buildfire/sdk/wiki/how-to-use-auth

buildfire.auth.login([options], callback); 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -