Geolocation and HTTP requests in the background with Ionic 2

1

I am creating an application with Ionic 2 in this application I need to get the geolocation of the device and make HTTP requests for a web service I have been publishing.

I used SQLite to save the information while it was offline, and to send it when I was online. Goodbye! The problem is that when I'm on IOs or Android if I press the "home" key or lock the devices simply to record the geolocation of the device and also to make the HTTP requests. However, it is important that as long as you have a connection, this information is sent even with the device blocked or with the application "minimized."

I studied ionic-native plugins like the BackgroundMode, and BackgroundGeolocation but did not work. In the case of backgroundMode it simply does not work on IOs, and BackgroundGeolocation even though it captures the geolocation and saves in SQLite the execution of HTTP calls is not made.

Does anyone know how I can handle this? I'm making use of IONIC VIEW for testing.

Thank you!

    
asked by anonymous 09.06.2017 / 02:26

0 answers