{"action":"created","issue":{"url":"https://api.github.com/repos/yigit/android-priority-jobqueue/issues/90","repository_url":"https://api.github.com/repos/yigit/android-priority-jobqueue","labels_url":"https://api.github.com/repos/yigit/android-priority-jobqueue/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/yigit/android-priority-jobqueue/issues/90/comments","events_url":"https://api.github.com/repos/yigit/android-priority-jobqueue/issues/90/events","html_url":"https://github.com/yigit/android-priority-jobqueue/issues/90","id":132145094,"number":90,"title":"Replace a foreground service","user":{"login":"MFlisar","id":2437726,"avatar_url":"https://avatars.githubusercontent.com/u/2437726?v=3","gravatar_id":"","url":"https://api.github.com/users/MFlisar","html_url":"https://github.com/MFlisar","followers_url":"https://api.github.com/users/MFlisar/followers","following_url":"https://api.github.com/users/MFlisar/following{/other_user}","gists_url":"https://api.github.com/users/MFlisar/gists{/gist_id}","starred_url":"https://api.github.com/users/MFlisar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MFlisar/subscriptions","organizations_url":"https://api.github.com/users/MFlisar/orgs","repos_url":"https://api.github.com/users/MFlisar/repos","events_url":"https://api.github.com/users/MFlisar/events{/privacy}","received_events_url":"https://api.github.com/users/MFlisar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-02-08T13:44:13Z","updated_at":"2016-08-13T08:03:45Z","closed_at":null,"body":"Is it possible to replace a foreground service with a job?\r\n\r\nSometimes, I want something to not stop at all until it's finished and I would use a foreground service, can this be replaced with a job?\r\n\r\nAs far as I can see, the only thing that comes near to that is a persistant job but this job may be stopped if I exit the app (although it restarts when I start the app again).\r\n\r\nThe texts in the readme somehow sound like replacing a service is possible as well...\r\n\r\nIf I see that correctly, it's not possible, all I can do is running a non persistant job in a service (or start a service when starting the job) and stop the service, when the job has finished, is that correct? But then I could just do the job's action directly in the service..."},"comment":{"url":"https://api.github.com/repos/yigit/android-priority-jobqueue/issues/comments/239608892","html_url":"https://github.com/yigit/android-priority-jobqueue/issues/90#issuecomment-239608892","issue_url":"https://api.github.com/repos/yigit/android-priority-jobqueue/issues/90","id":239608892,"user":{"login":"yigit","id":89202,"avatar_url":"https://avatars.githubusercontent.com/u/89202?v=3","gravatar_id":"","url":"https://api.github.com/users/yigit","html_url":"https://github.com/yigit","followers_url":"https://api.github.com/users/yigit/followers","following_url":"https://api.github.com/users/yigit/following{/other_user}","gists_url":"https://api.github.com/users/yigit/gists{/gist_id}","starred_url":"https://api.github.com/users/yigit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yigit/subscriptions","organizations_url":"https://api.github.com/users/yigit/orgs","repos_url":"https://api.github.com/users/yigit/repos","events_url":"https://api.github.com/users/yigit/events{/privacy}","received_events_url":"https://api.github.com/users/yigit/received_events","type":"User","site_admin":false},"created_at":"2016-08-13T08:03:45Z","updated_at":"2016-08-13T08:03:45Z","body":"JobManager.Callback is invoked after each job is done so you can get the information there.\r\nYou should de-couple the creation of the service from the job though. Especially for persistent jobs since the job instance that runs will be different than the job instance that receives onAdded call."}}
{"actor":{"display_login":"yigit"}}