Page 1 of 1

jQuery Application - Resume application from a background 'trigger' - What's the expected behavior?

Posted: Wed Aug 17, 2016 4:24 pm
by Bruce Stuart

I have built a jQuery application that does background GeoLocation using the Christocracy geo-location plugin.

It runs well in the foreground, runs flawlessly in the background. The GeoLocation plugin has a feature to restart the application upon termination on IOS (swipe away).

Technically - in the background this is accomplished on the plugin side - at termination - IOS provides a framework for doing this (via the location services api). The plugin writes to the IOS framework a stationary geo-fence around the current location - with a radius of around 50 meters.

Upon a significant location change - IOS wakes up the APP - and passes it the significant location change - and also restarts the app - from scratch.

The expected behavior from the plugin - and from the demo apps the plugin vendor has created - is that it does a window.locaton.reload() on startup - this then kicks off the geo-services again - and you're back in business - tracking the users location in the background - even though they swiped it away. This is also true upon phone restart - the plugin forces this same behavior.

In the Appery app however - the app terminaties and creates the stationary fence just fine. AND - IOS does in fact restart the app.

However, the Appery app - starts in the background - and IOS shows the app is active (it has an active PID) ... and the IOS privacy settings show the app monitoring location in the background - HOWEVER, the window.location.reload() never occurs.

The log review shows the app starting, Cordova saying the app started, and is in multi-tasking mode - however, the log entry that the Cordova library throws when fully loaded - which says "active" (preceded by name of app) - never shows.

What's going on in the background? What is Cordova doing in the background ? What would you guys expect ? Would you expect this to work? or not? if not - why not?


jQuery Application - Resume application from a background 'trigger' - What's the expected behavior?

Posted: Fri Aug 19, 2016 9:27 pm
by Illya Stepanov

Hi Bruce -

We can't tell you right now why there is such behavior, we'll forward this to our development team if someone had worked and familiar with such plugin.


jQuery Application - Resume application from a background 'trigger' - What's the expected behavior?

Posted: Fri Aug 26, 2016 3:23 pm
by Evgene Karachevtsev

Bruce,

We have the update from our development team. Unfortunately to answer your questions we need to deeply investigate this plugin and its cooperation with Appery.io. And this will require the Flex pack.


jQuery Application - Resume application from a background 'trigger' - What's the expected behavior?

Posted: Fri Aug 26, 2016 3:36 pm
by Evgene Karachevtsev

Bruce,

Also please note that this plugin has change log
https://github.com/transistorsoft/cor...
And the bug is fixed:
[Fixed] 'removeGeofences' was removing stationary-region. This would prevent stationary-exit if called while device is in stationary-mode