{"action":"created","issue":{"url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/197","repository_url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon","labels_url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/197/labels{/name}","comments_url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/197/comments","events_url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/197/events","html_url":"https://github.com/petermetz/cordova-plugin-ibeacon/issues/197","id":128373587,"number":197,"title":"Does startMonitoringForRegion run as background service?","user":{"login":"mahees","id":2651567,"avatar_url":"https://avatars.githubusercontent.com/u/2651567?v=3","gravatar_id":"","url":"https://api.github.com/users/mahees","html_url":"https://github.com/mahees","followers_url":"https://api.github.com/users/mahees/followers","following_url":"https://api.github.com/users/mahees/following{/other_user}","gists_url":"https://api.github.com/users/mahees/gists{/gist_id}","starred_url":"https://api.github.com/users/mahees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mahees/subscriptions","organizations_url":"https://api.github.com/users/mahees/orgs","repos_url":"https://api.github.com/users/mahees/repos","events_url":"https://api.github.com/users/mahees/events{/privacy}","received_events_url":"https://api.github.com/users/mahees/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"petermetz","id":1583231,"avatar_url":"https://avatars.githubusercontent.com/u/1583231?v=3","gravatar_id":"","url":"https://api.github.com/users/petermetz","html_url":"https://github.com/petermetz","followers_url":"https://api.github.com/users/petermetz/followers","following_url":"https://api.github.com/users/petermetz/following{/other_user}","gists_url":"https://api.github.com/users/petermetz/gists{/gist_id}","starred_url":"https://api.github.com/users/petermetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermetz/subscriptions","organizations_url":"https://api.github.com/users/petermetz/orgs","repos_url":"https://api.github.com/users/petermetz/repos","events_url":"https://api.github.com/users/petermetz/events{/privacy}","received_events_url":"https://api.github.com/users/petermetz/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-01-24T05:09:44Z","updated_at":"2016-02-21T14:33:34Z","closed_at":"2016-02-21T14:33:34Z","body":"Hi there,\r\n\r\nI did this in ionic, however im thinking at the native layer the monitoring as a background service might be related here.\r\n\r\nI would like to continue monitoring for iBeacons even though a user has \"swiped\" away the app in their list of running apps. Is this possible?\r\n\r\nPerhaps im using startMonitoringForRegion wrongly or not using the right method. \r\n\r\nWhen i lose beacon range and the user has app swiped away, the event didExitRegion doesn't seem to be emitted. Note event is emitted fine when app is in focus or running state.\r\n\r\nThe goal is to have this app installed as and listening for beacons as a background service and once its found, then notify the user to open the app, then start ranging.\r\n\r\nAny help/advise would be helpfull.\r\n\r\nPS i considered using the https://github.com/katzer/cordova-plugin-background-mode plugin but unsure if this is the way to proceed.\r\n\r\n\r\nThanks in advance!\r\n\r\n        $rootScope.$on('$cordovaBeacon:didEnterRegion', function(event, pluginResult) {\r\n            $cordovaVibration.vibrate(500);\r\n        });\r\n\r\n        $rootScope.$on('$cordovaBeacon:didExitRegion', function(event, pluginResult) {\r\n            $cordovaVibration.vibrate(500);\r\n        });\r\n        $cordovaBeacon.startMonitoringForRegion($cordovaBeacon.createBeaconRegion(\r\n            'apple', 'uuid-cleared-out', null, null, true\r\n        ));"},"comment":{"url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/comments/186832566","html_url":"https://github.com/petermetz/cordova-plugin-ibeacon/issues/197#issuecomment-186832566","issue_url":"https://api.github.com/repos/petermetz/cordova-plugin-ibeacon/issues/197","id":186832566,"user":{"login":"petermetz","id":1583231,"avatar_url":"https://avatars.githubusercontent.com/u/1583231?v=3","gravatar_id":"","url":"https://api.github.com/users/petermetz","html_url":"https://github.com/petermetz","followers_url":"https://api.github.com/users/petermetz/followers","following_url":"https://api.github.com/users/petermetz/following{/other_user}","gists_url":"https://api.github.com/users/petermetz/gists{/gist_id}","starred_url":"https://api.github.com/users/petermetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermetz/subscriptions","organizations_url":"https://api.github.com/users/petermetz/orgs","repos_url":"https://api.github.com/users/petermetz/repos","events_url":"https://api.github.com/users/petermetz/events{/privacy}","received_events_url":"https://api.github.com/users/petermetz/received_events","type":"User","site_admin":false},"created_at":"2016-02-21T14:33:34Z","updated_at":"2016-02-21T14:33:34Z","body":"Hi @mahees \r\n\r\nMonitoring should work even if the app is killed (swiped away). Perhaps you have some other issue with the code?\r\n\r\nApologies for the late reply, please re-open the issue if it's still relevant.\r\n\r\nKind regards,\r\nPeter"}}