{"comment":{"url":"https://api.github.com/repos/cowbell/cordova-plugin-geofence/comments/13103457","html_url":"https://github.com/cowbell/cordova-plugin-geofence/commit/3ece9e289b8fe71a4f80cc453dbf07c7b6cb7454#commitcomment-13103457","id":13103457,"user":{"login":"jgcaruso","id":4081020,"avatar_url":"https://avatars.githubusercontent.com/u/4081020?v=3","gravatar_id":"","url":"https://api.github.com/users/jgcaruso","html_url":"https://github.com/jgcaruso","followers_url":"https://api.github.com/users/jgcaruso/followers","following_url":"https://api.github.com/users/jgcaruso/following{/other_user}","gists_url":"https://api.github.com/users/jgcaruso/gists{/gist_id}","starred_url":"https://api.github.com/users/jgcaruso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgcaruso/subscriptions","organizations_url":"https://api.github.com/users/jgcaruso/orgs","repos_url":"https://api.github.com/users/jgcaruso/repos","events_url":"https://api.github.com/users/jgcaruso/events{/privacy}","received_events_url":"https://api.github.com/users/jgcaruso/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"3ece9e289b8fe71a4f80cc453dbf07c7b6cb7454","created_at":"2015-09-08T02:39:21Z","updated_at":"2015-09-08T02:39:21Z","body":"For what it's worth, I think the background event should fire all the time, and you can either pass in a Boolean stating if app is awake or not or just let the developer check themselves if the webview is initialized. \n\n\n\n\nWith that said, it should be consistent across all platforms too, and I don't recall how the iOS behaviour was implemented. \n\n\n\n—\nSent from Mailbox\n\nOn Mon, Sep 7, 2015 at 7:20 AM, Tomasz Subik <notifications@github.com>\nwrote:\n\n> I've just committed quick workaround possibility for you. You can check `GeofencePlugin.webView != null` in your receiver. There should be better way to do it, though. Like try to find main activity and if there is no activity running it means app is closed, that's just my guess.\n> ---\n> Reply to this email directly or view it on GitHub:\n> https://github.com/cowbell/cordova-plugin-geofence/commit/3ece9e289b8fe71a4f80cc453dbf07c7b6cb7454#commitcomment-13094848"}}