capacitor-background-location-miq
v0.1.3
Published
BackgroundLocation is a custom Capacitor 5 plugin that enables accurate background geolocation tracking on both Android and iOS using native APIs. It allows the app to receive continuous location updates even when the app is in the background or terminate
Downloads
54
Readme
background-location
BackgroundLocation is a custom Capacitor 5 plugin that enables accurate background geolocation tracking on both Android and iOS using native APIs. It allows the app to receive continuous location updates even when the app is in the background or terminated, and securely posts the data to a remote server.
Install
npm install background-location
npx cap syncAPI
startTracking()
startTracking() => Promise<void>stopTracking()
stopTracking() => Promise<void>addListener('locationUpdate', ...)
addListener(eventName: 'locationUpdate', listenerFunc: (data: LocationUpdate) => void) => Promise<PluginListenerHandle>| Param | Type |
| ------------------ | ---------------------------------------------------------------------------- |
| eventName | 'locationUpdate' |
| listenerFunc | (data: LocationUpdate) => void |
Returns: Promise<PluginListenerHandle>
Interfaces
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
LocationUpdate
| Prop | Type |
| --------------- | ------------------- |
| latitude | number |
| longitude | number |
| accuracy | number |
| timestamp | number |
