Call BackgroundLocator.unRegisterLocationUpdate() when the background locator is not running. The reason for this was to combat the issue regarding the unreliable return of BackgroundLocator.isRunning() on iOS. Because of this I always call BackgroundLocator.unRegisterLocationUpdate() to ensure the locator is killed, even if it was not running, but calling BackgroundLocator.unRegisterLocationUpdate() when the service is not running blocks the application because it never returns when awaited for.
When the background service is not running, the response of BackgroundLocator.unRegisterLocationUpdate() outputs Locator service is not running, nothing to stop in the terminal, but fails to return when awaited, and therefore the app just hangs forever waiting for BackgroundLocator.unRegisterLocationUpdate() to resolve.
Simple solution would be to just return the future when this happens.
Call
BackgroundLocator.unRegisterLocationUpdate()
when the background locator is not running. The reason for this was to combat the issue regarding the unreliable return ofBackgroundLocator.isRunning()
on iOS. Because of this I always callBackgroundLocator.unRegisterLocationUpdate()
to ensure the locator is killed, even if it was not running, but callingBackgroundLocator.unRegisterLocationUpdate()
when the service is not running blocks the application because it never returns when awaited for.When the background service is not running, the response of
BackgroundLocator.unRegisterLocationUpdate()
outputsLocator service is not running, nothing to stop
in the terminal, but fails to return when awaited, and therefore the app just hangs forever waiting forBackgroundLocator.unRegisterLocationUpdate()
to resolve.Simple solution would be to just return the future when this happens.