Closed boazlautman closed 5 years ago
I compile the app with builds.phonegap.com App crashes after showing the "BackgroundGeolocation tracking started" alert.
// 1. Listen to events var bgGeo = window.BackgroundGeolocation;
// 2. Execute #ready method: bgGeo.ready({ reset: true, // <-- true to always apply the supplied config distanceFilter: 10 }, function (state) { // <-- Current state provided to #configure callback // 3. Start tracking alert('BackgroundGeolocation is configured and ready to use'); if (!state.enabled) { bgGeo.start().then(function () { alert('- BackgroundGeolocation tracking started'); }); } });
Of course it does. Have you read the README of this deprecated repo you’re apparently using?
No, you didn’t.
I compile the app with builds.phonegap.com App crashes after showing the "BackgroundGeolocation tracking started" alert.
// 1. Listen to events var bgGeo = window.BackgroundGeolocation;