{"action":"created","issue":{"url":"https://api.github.com/repos/evernote/android-job/issues/23","repository_url":"https://api.github.com/repos/evernote/android-job","labels_url":"https://api.github.com/repos/evernote/android-job/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/evernote/android-job/issues/23/comments","events_url":"https://api.github.com/repos/evernote/android-job/issues/23/events","html_url":"https://github.com/evernote/android-job/issues/23","id":142099752,"number":23,"title":"Provide for external JobManager instance management","user":{"login":"tadfisher","id":129148,"avatar_url":"https://avatars.githubusercontent.com/u/129148?v=3","gravatar_id":"","url":"https://api.github.com/users/tadfisher","html_url":"https://github.com/tadfisher","followers_url":"https://api.github.com/users/tadfisher/followers","following_url":"https://api.github.com/users/tadfisher/following{/other_user}","gists_url":"https://api.github.com/users/tadfisher/gists{/gist_id}","starred_url":"https://api.github.com/users/tadfisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tadfisher/subscriptions","organizations_url":"https://api.github.com/users/tadfisher/orgs","repos_url":"https://api.github.com/users/tadfisher/repos","events_url":"https://api.github.com/users/tadfisher/events{/privacy}","received_events_url":"https://api.github.com/users/tadfisher/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-19T20:50:22Z","updated_at":"2016-03-20T17:35:13Z","closed_at":"2016-03-20T17:35:12Z","body":"I use Dagger in my application to manage singleton and scoped state in a consistent way.\r\n\r\nI'd like a version of `JobManager.create(Context)` that simply returns the created `JobManager` instance so I can manage this instance consistently with the rest of my application's dependencies.\r\n\r\nFor example, I do not need a JobManager instance until my user is signed in, which exists under a different runtime scope from the singleton scope. Providing access to this instance without a signed-in user means my jobs have to query that state to determine whether they should run, since the possibility exists to access the JobManager instance anywhere in the application. With a JobManager provided in a Dagger scope, this state is implicitly guaranteed.\r\n\r\nI'm fine with manually tearing down scheduled jobs via `cancelAll()` if my application loses that scope (i.e. the user signs out).\r\n\r\nFor BC purposes, it's understandable if you want to leave the `JobManager` and `JobRequest` APIs that rely on the default static instance."},"comment":{"url":"https://api.github.com/repos/evernote/android-job/issues/comments/198969951","html_url":"https://github.com/evernote/android-job/issues/23#issuecomment-198969951","issue_url":"https://api.github.com/repos/evernote/android-job/issues/23","id":198969951,"user":{"login":"tadfisher","id":129148,"avatar_url":"https://avatars.githubusercontent.com/u/129148?v=3","gravatar_id":"","url":"https://api.github.com/users/tadfisher","html_url":"https://github.com/tadfisher","followers_url":"https://api.github.com/users/tadfisher/followers","following_url":"https://api.github.com/users/tadfisher/following{/other_user}","gists_url":"https://api.github.com/users/tadfisher/gists{/gist_id}","starred_url":"https://api.github.com/users/tadfisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tadfisher/subscriptions","organizations_url":"https://api.github.com/users/tadfisher/orgs","repos_url":"https://api.github.com/users/tadfisher/repos","events_url":"https://api.github.com/users/tadfisher/events{/privacy}","received_events_url":"https://api.github.com/users/tadfisher/received_events","type":"User","site_admin":false},"created_at":"2016-03-20T17:35:12Z","updated_at":"2016-03-20T17:35:12Z","body":"That... makes a lot of sense. Thanks!"}}