Post background position to server
Hi, are you thinking about implementing a way to post the background location update to a server? It would be very helpful to my case.
Thanks in advance.
Hey! Yes, I thought about that before, as this can be implemented fairly easily for both Platforms, using iOS Background Sync and Android JobScheduler. But I've refreined from doing that in this library however, as you'd have to make assumptions about the server you're pushing the data to (how to contact the server? REST? If so, which API is expected? gRPC? Does it need Authentication?). It's hard to find a general way of performing the sync that can be put in this library. If you have any suggestions how to do this in a way that generalizes to lots of use cases, I'm open to that.
The most appropriate way to achieve this however is performing the Periodic Sync using a different library due to seperation of concerns. android_alarm_manager and (my) android_job_scheduler plugin are capable of doing this for android. I'm not sure if a Background execution library for both platforms exists (there hasn't last time I checked)
Am Mo., 3. Sep. 2018 um 09:22 Uhr schrieb antoninoSTB < [email protected]>:
Hi, are you thinking about implementing a way to post the background location update to a server? It would be very helpful to my case.
Thanks in advance.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/talkdirty/background_location_updates/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/ARqswHUTwoMCW4rG-2qJ3PtCT6Awv21Iks5uXNjSgaJpZM4WXF4Z .
I used a cordova plugin that solved most use cases with some key parameters, as you can see from the plugin example itself. In particular you can notice the url, httpHeaders and postTemplate parameters to let the user shape the POST to server