* This would be your own callback for Ajax-requests after POSTing background geolocation to your server.
* This would be your own callback for Ajax-requests after POSTing background geolocation to your server.
*/
*/
varyourAjaxCallback=function(response){
varyourAjaxCallback=function(response){
// NB: It's important to inform BackgroundGeolocation when your callback is complete so it can terminate the native background-process which is currently running your callback.
// If you fail to execute #finish, the OS might kill your app for leaving a background-process running.
bgGeo.finish();
bgGeo.finish();
};
};
...
@@ -181,19 +183,14 @@ var app = {
...
@@ -181,19 +183,14 @@ var app = {
// BackgroundGeoLocation is highly configurable.
// BackgroundGeoLocation is highly configurable.
bgGeo.configure(callbackFn,failureFn,{
bgGeo.configure(callbackFn,failureFn,{
url:'http://only.for.android.com/update_location.json',// <-- Android ONLY: your server url to send locations to