Closed mckoon closed 8 years ago
For offline support, we need to always store the latest version of a user's schedule locally client-side.
Possibly a tool to use for this: http://ionicframework.com/docs/v2/native/sqlite/
Alternatively, perhaps can write JSON somewhere persistent? Storing the results of the REST call (which is in JSON) as JSON is probably better.
Perhaps this is a solution: https://www.thepolyglotdeveloper.com/2014/06/saving-data-with-ionicframework/
Then we should on a recurring basis schedule alarms for when the user needs to take medication.
Local notifications: http://ionicframework.com/docs/v2/native/local-notifications/
We need to keep a reference to each alarm so we can clear them when the user takes the medicine early, or if a freshly downloaded schedule removes entries already with alarms.
Should probably use local storage for simplicity: http://cordova.apache.org/docs/en/latest/cordova/storage/storage.html#localstorage
gets weekly schedule every 5 min and reschedules locally.
For offline support, we need to always store the latest version of a user's schedule locally client-side.
Possibly a tool to use for this: http://ionicframework.com/docs/v2/native/sqlite/
Alternatively, perhaps can write JSON somewhere persistent? Storing the results of the REST call (which is in JSON) as JSON is probably better.
Perhaps this is a solution: https://www.thepolyglotdeveloper.com/2014/06/saving-data-with-ionicframework/
Then we should on a recurring basis schedule alarms for when the user needs to take medication.
Local notifications: http://ionicframework.com/docs/v2/native/local-notifications/
We need to keep a reference to each alarm so we can clear them when the user takes the medicine early, or if a freshly downloaded schedule removes entries already with alarms.