pmwisdom/cordova-background-geolocation-services

Nothings happens when app switching to background

Closed this issue · 1 comments

Thank you for your plugin!
I have one problem with using plugin. When app switch to background mode, LocationService start, but in next step sleeping too. And nothings happens. If i'am quickly turn on and turn off my phone, so that LocationService no time to stop all work correct in second launch. Or come some event (for example background fetch event) and LocationService alive and working. What may be causing the problem?

-- First launch --
2016-10-08 22:13:34.890930 Dobra[4874:2066608] [LocationServices] - App Will Resign. Enabled? true
2016-10-08 22:13:34.895935 Dobra[4874:2066608] [LocationServices] - Starting Location Updates!
2016-10-08 22:13:34.902974 Dobra[4874:2066608] Activity Manager - Starting Detection 1
2016-10-08 22:13:34.904740 Dobra[4874:2066608] -- [ mapService.pause ] --
2016-10-08 22:13:34.911578 Dobra[4874:2066608] [LocationServices] - App Suspended. Enabled? true
2016-10-08 22:13:34.911630 Dobra[4874:2066608] [LocationServices] - A request was made to start Updating, but the plugin was already updating
2016-10-08 22:13:34.911675 Dobra[4874:2066608] Activity Manager - Starting Detection 1

-- Second quickly launch (or some event) --
2016-10-08 22:47:41.699266 Dobra[4903:2073565] [LocationServices] - Setting GPS To Low Power Mode
2016-10-08 22:47:41.701243 Dobra[4903:2073565] [LocationServices] - Starting Location Updates!
2016-10-08 22:47:41.701355 Dobra[4903:2073565] [LocationServices] - sync called
2016-10-08 22:47:41.701882 Dobra[4903:2073565] [LocationServices] - locationArray has no entries
2016-10-08 22:47:41.702005 Dobra[4903:2073565] [LocationServices] - Stopped Location Updates After 2.0
2016-10-08 22:47:41.866559 Dobra[4903:2073565] [LocationServices] - App Will Resign. Enabled? true
2016-10-08 22:47:41.867390 Dobra[4903:2073565] [LocationServices] - A request was made to start Updating, but the plugin was already updating
2016-10-08 22:47:41.867670 Dobra[4903:2073565] Activity Manager - Starting Detection 1
2016-10-08 22:47:41.870007 Dobra[4903:2073565] -- [ mapService.pause ] --
2016-10-08 22:47:41.873258 Dobra[4903:2073565] [LocationServices] - App Suspended. Enabled? true
2016-10-08 22:47:41.873515 Dobra[4903:2073565] [LocationServices] - A request was made to start Updating, but the plugin was already updating
2016-10-08 22:47:41.873671 Dobra[4903:2073565] Activity Manager - Starting Detection 1
2016-10-08 22:47:43.876416 Dobra[4903:2073565] [LocationServices] - Setting GPS To Low Power Mode
2016-10-08 22:47:43.918781 Dobra[4903:2073565] [LocationServices] - Starting Location Updates!
2016-10-08 22:47:43.919151 Dobra[4903:2073565] [LocationServices] - sync called
2016-10-08 22:47:43.925907 Dobra[4903:2073565] [LocationServices] - bestLocation: {Optional(<+56.63186765,+47.92771956> +/- 65.00m (speed -1.00 mps / course -1.00) @ 08.10.16, 22:47:41 Москва, стандартное время)}
2016-10-08 22:47:43.926109 Dobra[4903:2073565] [LocationServices] - Got Location Update: { 56.6318676503347 - 47.9277195591617 } Accuracy: 65.0
2016-10-08 22:47:43.926410 Dobra[4903:2073565] [LocationServices] - Sending Notification
2016-10-08 22:47:43.928052 Dobra[4903:2073565] [LocationServices] - Stopped Location Updates After 2.0
2016-10-08 22:47:43.968128 Dobra[4903:2073565] -- bgLocationServices update

Try new version and re-open if still an issue. Thanks.