Closed techteamPA closed 2 years ago
Switch off the internet
How exactly are you “switching off the internet”?
You can’t simulate “switching off the internet” by disabling Wifi. Disabling wifi will prevent locations being able to be recorded.
I test 12 Android devices without a SIM card. The plugin tracks fine without a SIM card.
while traveling on a metro train
Do you know that GPS only works outdoors?
mobile location-services != GPS.
mobile location-services has 3 providers:
Yes we know all these parameters or information about the GPS mechanism However, we just like to know that, no matter if the device is at an outdoor location (or wherever the device can receive the GPS coordinates) the library will provide a callback that can be checked via logs. Right? So that we can rest assured that all these coordinates can be stored in local storage and then an application can try sending the logs to the server if the app is in connectivity
The plugin doesn’t manufacture locations. It merely turns on a “switch” of the native location api and locations begin to flow.
If the user does something to the device that prevents locations from flowing (turns off wifi) or goes somewhere that receiving a location is impossible (Eg subway tunnel), then there’s no magic that can provide a location.
sometimes, receiving a location is simply impossible.
So that we can rest assured that all these coordinates can be stored in local storage and then an application can try sending the logs to the server if the app is in connectivity
Read the api docs “HTTP Guide”.
this plugin was originally developed for a disaster response app, tracking emergency workers in earthquakes in an environment where the cellular network is assumed to be destroyed. It is designed to work in “offline” environments, persisting each recorded location to its own SQLite database, uploading those queued locations when a network connection is restored.
Read the api docs “HTTP Guide”.
this plugin was originally developed for a disaster response app, tracking emergency workers in earthquakes in an environment where the cellular network is assumed to be destroyed. It is designed to work in “offline” environments, persisting each recorded location to its own SQLite database, and uploading those queued locations when a network connection is restored.
Thank you for sharing the information that was really helpful. Could you please let us know how this offline mechanism works? Can we fetch the offline data from the SQLite table and upload it to our server as soon as the device is back online. Or you would suggest relying on the existing in-built mechanism.
See api docs .getLocation()
Or you would suggest relying on the existing in-built mechanism.
Why you not provide the plugin a Config.url and let the plugin manage http uploads using its pure native http service? It’s far more reliable than rolling your own in JavaScript.
Why do you not provide the plugin a Config.url and let the plugin manage HTTP uploads using its pure native HTTP service? It’s far more reliable than rolling your own in JavaScript.
Thank you for sharing the information that was really helpful. Could you please confirm that the plugin will work in kill state on iOS/Android?
Could you please confirm that the plugin will work in kill state on iOS/Android?
Yes, that’s why there exists the option Config.stopOnTerminate (and Config.startOnBoot). See the api docs.
Your Environment
react-native -v
): 0.66.3Expected Behavior
The application should receive a GPS callback even if there is no internet connectivity.
Actual Behavior
No logs get logged on the server if there is minimum or no internet connectivity.
Steps to Reproduce
Context
We trying to use the application while traveling on a metro train where there is minimum internet connectivity. The application was tested in released mode.
Debug logs
Logs
``` PASTE_YOUR_LOGS_HERE ```