{"action":"closed","issue":{"url":"https://api.github.com/repos/evernote/android-job/issues/65","repository_url":"https://api.github.com/repos/evernote/android-job","labels_url":"https://api.github.com/repos/evernote/android-job/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/evernote/android-job/issues/65/comments","events_url":"https://api.github.com/repos/evernote/android-job/issues/65/events","html_url":"https://github.com/evernote/android-job/issues/65","id":168695699,"number":65,"title":"when network is available,it sames that ,you did not rescheduleTasksIfNecessary?","user":{"login":"bravekingzhang","id":4476322,"avatar_url":"https://avatars.githubusercontent.com/u/4476322?v=3","gravatar_id":"","url":"https://api.github.com/users/bravekingzhang","html_url":"https://github.com/bravekingzhang","followers_url":"https://api.github.com/users/bravekingzhang/followers","following_url":"https://api.github.com/users/bravekingzhang/following{/other_user}","gists_url":"https://api.github.com/users/bravekingzhang/gists{/gist_id}","starred_url":"https://api.github.com/users/bravekingzhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bravekingzhang/subscriptions","organizations_url":"https://api.github.com/users/bravekingzhang/orgs","repos_url":"https://api.github.com/users/bravekingzhang/repos","events_url":"https://api.github.com/users/bravekingzhang/events{/privacy}","received_events_url":"https://api.github.com/users/bravekingzhang/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-01T17:12:52Z","updated_at":"2016-08-01T19:22:28Z","closed_at":"2016-08-01T19:22:27Z","body":"\r\n```java\r\nprivate void rescheduleTasksIfNecessary() {\r\n        PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);\r\n        final PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, JobManager.class.getName());\r\n        if (JobUtil.hasWakeLockPermission(mContext)) {\r\n            wakeLock.setReferenceCounted(false);\r\n            wakeLock.acquire(TimeUnit.SECONDS.toMillis(3));\r\n        }\r\n.......\r\n```\r\nit sames that ,you need this \r\n\r\n```java\r\n private JobManager(Context context) {\r\n        mContext = context;\r\n        mJobCreatorHolder = new JobCreatorHolder();\r\n        mJobStorage = new JobStorage(context);\r\n        mJobExecutor = new JobExecutor();\r\n\r\n        setJobProxy(JobApi.getDefault(mContext));\r\n\r\n        rescheduleTasksIfNecessary();\r\n\r\n        // TODO: 16/8/2 when network is available,do rescheduleTasksIfNecessary?\r\n        \r\n    }\r\n\r\n```"}}
{"actor":{"display_login":"vRallev"}}