Subscription¶
Handle returned by every BackgroundGeolocation.on* event-listener method.
Subscription exposes a single remove method used to stop
listening to an event and free associated resources. Always call remove()
when a listener is no longer needed to prevent memory leaks.
Removing an event-listener¶
Managing multiple subscriptions¶
Collect subscriptions in an array and remove them all at once — for example when a view is destroyed.
Members¶
remove¶
Removes the event-listener and frees its resources. Call this when the listener is no longer needed to prevent memory leaks.