cordova-plugin-background-geolocation
cordova-plugin-background-geolocation copied to clipboard
close app, stop service
hi im using in ionic 4, when i close the app, this service end, i need that run this server ever, until the user want stop
thanks for your help
Forever is probably not possible since the OS can kill it due to battery optimization, but have you tried to set startForeground
to true
? It helped me when I needed it to run in the background for long period of time.
@edgrod01 can you give some more information about your environment?
why after closing app on ios the plugin stop working. in android this plugin works in background forever even if we close the app. thank you
+1
have the same issue, on my android plugin works fine, but on ios after restarting app I check status of BackgroundGeolocation and have isRunning: false
@HarelM, @skibaalex any solution? do you need any information? maybe I miss something?
Thank you
From my experience the background location works differently in live environment after Apple approved the app. In my case the behavior was the same and I'm my case I could implement server side solution and after they approved it it worked like expected 🤷♂️
I haven't fully tested it on iOS, but I haven't received any complains from my users so I guess it just worked for me... My location service wrapper can be found here: https://github.com/IsraelHikingMap/Site/blob/master/IsraelHiking.Web/sources/application/services/geo-location.service.ts Feel free to copy it :-)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.