* This would be your own callback for Ajax-requests after POSTing background geolocation to your server.
*/
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();
};
...
...
@@ -181,19 +183,14 @@ var app = {
// BackgroundGeoLocation is highly configurable.
bgGeo.configure(callbackFn,failureFn,{
url:'http://only.for.android.com/update_location.json',// <-- Android ONLY: your server url to send locations to
params:{
auth_token:'user_secret_auth_token',// <-- Android ONLY: HTTP POST params sent to your server when persisting locations.
foo:'bar'// <-- Android ONLY: HTTP POST params sent to your server when persisting locations.