{"action":"created","issue":{"url":"https://api.github.com/repos/cozy/cozy-mobile/issues/30","labels_url":"https://api.github.com/repos/cozy/cozy-mobile/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/cozy/cozy-mobile/issues/30/comments","events_url":"https://api.github.com/repos/cozy/cozy-mobile/issues/30/events","html_url":"https://github.com/cozy/cozy-mobile/pull/30","id":59216267,"number":30,"title":"Display cozy's notification as android notifications","user":{"login":"jacquarg","id":1233038,"avatar_url":"https://avatars.githubusercontent.com/u/1233038?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquarg","html_url":"https://github.com/jacquarg","followers_url":"https://api.github.com/users/jacquarg/followers","following_url":"https://api.github.com/users/jacquarg/following{/other_user}","gists_url":"https://api.github.com/users/jacquarg/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquarg/subscriptions","organizations_url":"https://api.github.com/users/jacquarg/orgs","repos_url":"https://api.github.com/users/jacquarg/repos","events_url":"https://api.github.com/users/jacquarg/events{/privacy}","received_events_url":"https://api.github.com/users/jacquarg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-27T10:14:38Z","updated_at":"2015-03-03T09:39:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cozy/cozy-mobile/pulls/30","html_url":"https://github.com/cozy/cozy-mobile/pull/30","diff_url":"https://github.com/cozy/cozy-mobile/pull/30.diff","patch_url":"https://github.com/cozy/cozy-mobile/pull/30.patch"},"body":"Use background service to synchronise notifications periodically (15'), use in progress js-background-service ( https://github.com/jacquarg/cordova-jsbackgroundservice )\r\n\r\nThere is stil some QD choices which should be discussed :\r\n- For testing purpose, _forward_to_mobile_ filter is disconnected.\r\n- Notifications are _removed_ from local db to be marked as read. There isn't synchronization with the cozy yet.\r\n- Architecture isn't that clean (db requests directly in views/notifications.coffe, ...)\r\n- Needs day-to-day testing, to test battery consumption, and robustness.\r\n\r\nLabels : IN PROGRESS"},"comment":{"url":"https://api.github.com/repos/cozy/cozy-mobile/issues/comments/76914554","html_url":"https://github.com/cozy/cozy-mobile/pull/30#issuecomment-76914554","issue_url":"https://api.github.com/repos/cozy/cozy-mobile/issues/30","id":76914554,"user":{"login":"aenario","id":1580287,"avatar_url":"https://avatars.githubusercontent.com/u/1580287?v=3","gravatar_id":"","url":"https://api.github.com/users/aenario","html_url":"https://github.com/aenario","followers_url":"https://api.github.com/users/aenario/followers","following_url":"https://api.github.com/users/aenario/following{/other_user}","gists_url":"https://api.github.com/users/aenario/gists{/gist_id}","starred_url":"https://api.github.com/users/aenario/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aenario/subscriptions","organizations_url":"https://api.github.com/users/aenario/orgs","repos_url":"https://api.github.com/users/aenario/repos","events_url":"https://api.github.com/users/aenario/events{/privacy}","received_events_url":"https://api.github.com/users/aenario/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T09:39:32Z","updated_at":"2015-03-03T09:39:32Z","body":"Not much to say code-wise.\r\n\r\nArchitecture wise, I feel it would be cleaner to have the Service extends Backbone.Model. This class would then manage the JSBackgroundService and have daemonRunning as an attributes.\r\nConfigView would then only \r\n```service.on \"change\", -> render() ```\r\n\r\nThis would avoid the need for checkRunning every time you try to change it. And provide a single place for changes related to your plugin.\r\n\r\nDo you want me to review the JSBackgroundPlugin or do you plan on tidying it up first ?  \r\n\r\n"}}