{"action":"closed","issue":{"url":"https://api.github.com/repos/BabakAp/MobiTrace/issues/2","labels_url":"https://api.github.com/repos/BabakAp/MobiTrace/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/BabakAp/MobiTrace/issues/2/comments","events_url":"https://api.github.com/repos/BabakAp/MobiTrace/issues/2/events","html_url":"https://github.com/BabakAp/MobiTrace/issues/2","id":65824223,"number":2,"title":"Location services turned off","user":{"login":"BabakAp","id":5207611,"avatar_url":"https://avatars.githubusercontent.com/u/5207611?v=3","gravatar_id":"","url":"https://api.github.com/users/BabakAp","html_url":"https://github.com/BabakAp","followers_url":"https://api.github.com/users/BabakAp/followers","following_url":"https://api.github.com/users/BabakAp/following{/other_user}","gists_url":"https://api.github.com/users/BabakAp/gists{/gist_id}","starred_url":"https://api.github.com/users/BabakAp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BabakAp/subscriptions","organizations_url":"https://api.github.com/users/BabakAp/orgs","repos_url":"https://api.github.com/users/BabakAp/repos","events_url":"https://api.github.com/users/BabakAp/events{/privacy}","received_events_url":"https://api.github.com/users/BabakAp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-02T02:53:49Z","updated_at":"2015-07-28T03:05:22Z","closed_at":"2015-07-28T03:05:22Z","body":"After the location service has started, the user can turn off the location services, it will no longer receive location change updates and there are not broadcasts associated with location being turned on/off (There used to be, but removed)\r\nSo we have check location is on, only on actions using:\r\n\r\nString locationProviders = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED);\r\nif (locationProviders == null || locationProviders.equals(\"\")) {\r\n    ...\r\n    startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));\r\n}\r\n\r\nWe might have to periodically check to see if location is on using a timer."}}