{"action":"created","issue":{"url":"https://api.github.com/repos/dose-amigos/dose-amigos-ionic/issues/8","repository_url":"https://api.github.com/repos/dose-amigos/dose-amigos-ionic","labels_url":"https://api.github.com/repos/dose-amigos/dose-amigos-ionic/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/dose-amigos/dose-amigos-ionic/issues/8/comments","events_url":"https://api.github.com/repos/dose-amigos/dose-amigos-ionic/issues/8/events","html_url":"https://github.com/dose-amigos/dose-amigos-ionic/issues/8","id":161558296,"number":8,"title":"Queue Server Calls When Offline","user":{"login":"mckoon","id":6886583,"avatar_url":"https://avatars.githubusercontent.com/u/6886583?v=3","gravatar_id":"","url":"https://api.github.com/users/mckoon","html_url":"https://github.com/mckoon","followers_url":"https://api.github.com/users/mckoon/followers","following_url":"https://api.github.com/users/mckoon/following{/other_user}","gists_url":"https://api.github.com/users/mckoon/gists{/gist_id}","starred_url":"https://api.github.com/users/mckoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mckoon/subscriptions","organizations_url":"https://api.github.com/users/mckoon/orgs","repos_url":"https://api.github.com/users/mckoon/repos","events_url":"https://api.github.com/users/mckoon/events{/privacy}","received_events_url":"https://api.github.com/users/mckoon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-21T22:54:12Z","updated_at":"2016-06-22T16:38:38Z","closed_at":null,"body":"Since Dose Amigos is meant to run when offline by saving the schedule locally and setting local notifications as alarms, this means a user could also be taking their medication when the device is offline.\r\n\r\nWe need to be able to queue up calls to the server locally so that they can be sent to the server when the device is online.\r\n\r\nOne option is to wrap the HTTP service in a service that checks if we are offline. If offline, write data to local storage, if online, call via HTTP.\r\n\r\nOther similar solution would be to have a service that only writes events to local storage. Then we have a recurring task that just syncs events in the local storage to the server.  This may come with a performance penalty.\r\n\r\nhttps://www.thepolyglotdeveloper.com/2014/06/saving-data-with-ionicframework/\r\n\r\nhttp://ionicframework.com/docs/v2/native/sqlite/"},"comment":{"url":"https://api.github.com/repos/dose-amigos/dose-amigos-ionic/issues/comments/227802617","html_url":"https://github.com/dose-amigos/dose-amigos-ionic/issues/8#issuecomment-227802617","issue_url":"https://api.github.com/repos/dose-amigos/dose-amigos-ionic/issues/8","id":227802617,"user":{"login":"mckoon","id":6886583,"avatar_url":"https://avatars.githubusercontent.com/u/6886583?v=3","gravatar_id":"","url":"https://api.github.com/users/mckoon","html_url":"https://github.com/mckoon","followers_url":"https://api.github.com/users/mckoon/followers","following_url":"https://api.github.com/users/mckoon/following{/other_user}","gists_url":"https://api.github.com/users/mckoon/gists{/gist_id}","starred_url":"https://api.github.com/users/mckoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mckoon/subscriptions","organizations_url":"https://api.github.com/users/mckoon/orgs","repos_url":"https://api.github.com/users/mckoon/repos","events_url":"https://api.github.com/users/mckoon/events{/privacy}","received_events_url":"https://api.github.com/users/mckoon/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T16:38:38Z","updated_at":"2016-06-22T16:38:38Z","body":"Should probably use local storage for simplicity: http://cordova.apache.org/docs/en/latest/cordova/storage/storage.html#localstorage"}}
{"actor":{"display_login":"mckoon"}}