{"action":"created","issue":{"url":"https://api.github.com/repos/blue-systems-group/project.maybe.android.library/issues/13","labels_url":"https://api.github.com/repos/blue-systems-group/project.maybe.android.library/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/blue-systems-group/project.maybe.android.library/issues/13/comments","events_url":"https://api.github.com/repos/blue-systems-group/project.maybe.android.library/issues/13/events","html_url":"https://github.com/blue-systems-group/project.maybe.android.library/issues/13","id":108220742,"number":13,"title":"Need a mechanism for periodic PULL","user":{"login":"xcv58","id":503123,"avatar_url":"https://avatars.githubusercontent.com/u/503123?v=3","gravatar_id":"","url":"https://api.github.com/users/xcv58","html_url":"https://github.com/xcv58","followers_url":"https://api.github.com/users/xcv58/followers","following_url":"https://api.github.com/users/xcv58/following{/other_user}","gists_url":"https://api.github.com/users/xcv58/gists{/gist_id}","starred_url":"https://api.github.com/users/xcv58/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xcv58/subscriptions","organizations_url":"https://api.github.com/users/xcv58/orgs","repos_url":"https://api.github.com/users/xcv58/repos","events_url":"https://api.github.com/users/xcv58/events{/privacy}","received_events_url":"https://api.github.com/users/xcv58/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-24T21:48:56Z","updated_at":"2015-09-25T14:10:47Z","closed_at":null,"body":"Only use BOOT_COMPLETED is not good enough. If someone never reboot phone."},"comment":{"url":"https://api.github.com/repos/blue-systems-group/project.maybe.android.library/issues/comments/143234368","html_url":"https://github.com/blue-systems-group/project.maybe.android.library/issues/13#issuecomment-143234368","issue_url":"https://api.github.com/repos/blue-systems-group/project.maybe.android.library/issues/13","id":143234368,"user":{"login":"xcv58","id":503123,"avatar_url":"https://avatars.githubusercontent.com/u/503123?v=3","gravatar_id":"","url":"https://api.github.com/users/xcv58","html_url":"https://github.com/xcv58","followers_url":"https://api.github.com/users/xcv58/followers","following_url":"https://api.github.com/users/xcv58/following{/other_user}","gists_url":"https://api.github.com/users/xcv58/gists{/gist_id}","starred_url":"https://api.github.com/users/xcv58/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xcv58/subscriptions","organizations_url":"https://api.github.com/users/xcv58/orgs","repos_url":"https://api.github.com/users/xcv58/repos","events_url":"https://api.github.com/users/xcv58/events{/privacy}","received_events_url":"https://api.github.com/users/xcv58/received_events","type":"User","site_admin":false},"created_at":"2015-09-25T14:10:47Z","updated_at":"2015-09-25T14:10:47Z","body":"Right now, it uses GCM Network Manager in my local branch. But it seems not optimal solution.\r\n\r\nFrom https://github.com/jacktech24/gcmnetworkmanager-android-example/blob/master/README.md\r\n\r\n> There must be (as for now) installed Google Play services to make this work (even on Lollipop+).\r\n\r\nSo it requires extra work to detect whether Google Play Services exist, and probably need a backup solution if Google Play Services not exist.\r\n\r\n> ### Can I get the queque of the tasks from in-app?\r\n> Again, for now, you can't. There is no API for getting list of your scheduled tasks.\r\n\r\nSo it seems we need maintain the task exist state by ourself.\r\n\r\n## In short\r\nThere're two way to init our periodic pull task:\r\n\r\n1. BOOT COMPLETED\r\n\r\n2. The first time app open.\r\n\r\nBut we don't wanna it happen twice. So we need make sure only init the task once. If it's impossible, we need make sure the subsequent init doesn't take effect and disturb first one."}}