transistorsoft / cordova-background-geolocation-lt

The most sophisticated background location-tracking & geofencing module with battery-conscious motion-detection intelligence for iOS and Android.
http://www.transistorsoft.com/shop/products/cordova-background-geolocation
Other
655 stars 277 forks source link

Disable url through setConfig #1321

Closed QP-JoBi closed 2 years ago

QP-JoBi commented 2 years ago

Your Environment

Expected Behavior

After #ready a server url is set to the according backend. However, in our usage there are repeated phases where the gps coordinates have to be sent over to the backend and others where this should not happen. Since the docs tell you the default value of "url" is undefined, our approaches were to use .setConfig({ url: undefined }) or .setConfig({ url: null }) in order to disable the transmission.

Actual Behavior

.setConfig({ url: undefined }) led to no changes at all - the url in the config remained to be the backend url previously provided.

.setConfig({ url: null }) led to the url being set to "null" (type string)

Transmission was still ongoing in both cases after using .setConfig({ url: ... })

Question

How can you stop the transfer to the server once a valid URL has been provided?

christocracy commented 2 years ago

Set it empty string ""