{"action":"created","issue":{"url":"https://api.github.com/repos/cowbell/cordova-plugin-geofence/issues/26","labels_url":"https://api.github.com/repos/cowbell/cordova-plugin-geofence/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/cowbell/cordova-plugin-geofence/issues/26/comments","events_url":"https://api.github.com/repos/cowbell/cordova-plugin-geofence/issues/26/events","html_url":"https://github.com/cowbell/cordova-plugin-geofence/issues/26","id":60257991,"number":26,"title":"Firing receiveTransition if the app is started within a fence ","user":{"login":"gleerman","id":5098787,"avatar_url":"https://avatars.githubusercontent.com/u/5098787?v=3","gravatar_id":"","url":"https://api.github.com/users/gleerman","html_url":"https://github.com/gleerman","followers_url":"https://api.github.com/users/gleerman/followers","following_url":"https://api.github.com/users/gleerman/following{/other_user}","gists_url":"https://api.github.com/users/gleerman/gists{/gist_id}","starred_url":"https://api.github.com/users/gleerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gleerman/subscriptions","organizations_url":"https://api.github.com/users/gleerman/orgs","repos_url":"https://api.github.com/users/gleerman/repos","events_url":"https://api.github.com/users/gleerman/events{/privacy}","received_events_url":"https://api.github.com/users/gleerman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-08T14:08:13Z","updated_at":"2015-03-11T16:02:42Z","closed_at":null,"body":"Hi,\r\n\r\nI noticed that when I start my app inside a fence, the ```receiveTransition``` is not fired for that fence. I suppose there are some valid arguments for this behaviour, since there is no real transition happening. However, there are cases where it is desirable to notify the app when it is inside a fence on startup.\r\n\r\nFor iOS, I found [this thread](http://stackoverflow.com/questions/18343960/startmonitoringforregion-is-not-calling-didenterregion-if-the-app-is-started-wit). I'm proposing the approach where a check on initialization is implemented.  We could provide an argument to the ```initialize``` method to toggle this behaviour. Let me know what you think.\r\n\r\nSince I am only testing on iOS for now, I am not really aware of the behaviour on Android. I came accross the [GEOFENCE_TRANSITION_DWELL](https://developer.android.com/reference/com/google/android/gms/location/Geofence.html#GEOFENCE_TRANSITION_DWELL) transition type, but I am not entirely sure if that is what we are looking for. Anyone who knows more about this for Android or who is willing to test?\r\n\r\nPlease share your thoughts on this."},"comment":{"url":"https://api.github.com/repos/cowbell/cordova-plugin-geofence/issues/comments/78293759","html_url":"https://github.com/cowbell/cordova-plugin-geofence/issues/26#issuecomment-78293759","issue_url":"https://api.github.com/repos/cowbell/cordova-plugin-geofence/issues/26","id":78293759,"user":{"login":"tsubik","id":1286444,"avatar_url":"https://avatars.githubusercontent.com/u/1286444?v=3","gravatar_id":"","url":"https://api.github.com/users/tsubik","html_url":"https://github.com/tsubik","followers_url":"https://api.github.com/users/tsubik/followers","following_url":"https://api.github.com/users/tsubik/following{/other_user}","gists_url":"https://api.github.com/users/tsubik/gists{/gist_id}","starred_url":"https://api.github.com/users/tsubik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsubik/subscriptions","organizations_url":"https://api.github.com/users/tsubik/orgs","repos_url":"https://api.github.com/users/tsubik/repos","events_url":"https://api.github.com/users/tsubik/events{/privacy}","received_events_url":"https://api.github.com/users/tsubik/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T16:02:42Z","updated_at":"2015-03-11T16:02:42Z","body":"I could add some timestamp to geofence like `created_at` and just filter out the new ones while creating notification. I am not aware about function like `requestStateForRegion` for android, though."}}