cowbell / cordova-plugin-geofence

Geofencing plugin for cordova
Apache License 2.0
265 stars 317 forks source link

Execute code in the Background? #137

Open Wade-BuildOtto opened 8 years ago

Wade-BuildOtto commented 8 years ago

#35

I didn't see a final answer, that it's been proven with an example that it does still work in the background all my field test come up as not working unless the app is in the foreground. Is this only useful for sending notifications on Geo Events?

Execute code or URL Posting.

Wade-BuildOtto commented 8 years ago

In field testing this didn't execute any code on onTransitionReceived, I received local notifications once last night when I exited, but none when I re-entered this morning, I don't think this works like it suppose to.

It seem like you have to setup the geo-fence with everything you want it to do and then thats it.

it's like it expires after one use, and it need to include a URL to call back that retriggers the app, otherwise it doesn't do anything new.

Sohib commented 7 years ago

have you tried using this plugin to run in the background ? https://github.com/katzer/cordova-plugin-background-mode

Wade-BuildOtto commented 7 years ago

apple wont let your app continually run in the background collecting location data unless its a transportation or fitness app, it just wont get approved.

registering geofences with the system allows the system to manage usage and wake up killed app if it hits any of your fences.

but that requires an updated swift 3 and it also requires the webview to also restore on geofence triggers.

On Thu, Dec 15, 2016 at 5:00 AM, Sohib notifications@github.com wrote:

have you tried using this plugin to run in the background ? https://github.com/katzer/cordova-plugin-background-mode

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cowbell/cordova-plugin-geofence/issues/137#issuecomment-267311333, or mute the thread https://github.com/notifications/unsubscribe-auth/APG2r00_4FMYVSRuxAhUV9kRte_suhLtks5rISvZgaJpZM4IEwDj .