0.0.16 • Published 5 months ago

elsapiens-background-location v0.0.16

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

elsapiens-background-location

Save background location in sql lite and make available to cpacitor subscription when app is active

Install

npm install elsapiens-background-location
npx cap sync

API

startTracking(...)

startTracking({ reference, highAccuracy, minDistance, interval }: { reference: string; highAccuracy: boolean; minDistance: number; interval: number; }) => Promise<void>
ParamType
__0{ reference: string; highAccuracy: boolean; minDistance: number; interval: number; }

stopTracking()

stopTracking() => Promise<void>

getStoredLocations(...)

getStoredLocations({ reference }: { reference: string; }) => Promise<{ locations: LocationData[]; }>
ParamType
__0{ reference: string; }

Returns: Promise<{ locations: LocationData[]; }>


clearStoredLocations()

clearStoredLocations() => Promise<void>

addListener('locationUpdate', ...)

addListener(eventName: 'locationUpdate', listenerFunc: (data: LocationData) => void) => Promise<PluginListenerHandle>
ParamType
eventName'locationUpdate'
listenerFunc(data: LocationData) => void

Returns: Promise<PluginListenerHandle>


addListener('locationStatus', ...)

addListener(eventName: 'locationStatus', listenerFunc: (status: { enabled: boolean; }) => void) => Promise<PluginListenerHandle>
ParamType
eventName'locationStatus'
listenerFunc(status: { enabled: boolean; }) => void

Returns: Promise<PluginListenerHandle>


getLastLocation(...)

getLastLocation({ reference }: { reference: string; }) => Promise<void>
ParamType
__0{ reference: string; }

startLocationStatusTracking()

startLocationStatusTracking() => Promise<void>

stopLocationStatusTracking()

stopLocationStatusTracking() => Promise<void>

Interfaces

LocationData

PropType
referencestring
indexnumber
latitudenumber
longitudenumber
altitudenumber
speednumber
headingnumber
accuracynumber
altitudeAccuracynumber
totalDistancenumber
timestampnumber

PluginListenerHandle

PropType
remove() => Promise<void>
0.0.15

5 months ago

0.0.16

5 months ago

0.0.14

5 months ago

0.0.13

5 months ago

0.0.12

5 months ago

0.0.10

5 months ago

0.0.11

5 months ago

0.0.9

6 months ago

0.0.8

6 months ago

0.0.7

6 months ago

0.0.6

6 months ago

0.0.5

6 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago