1.3.69 • Published 1 year ago

infa-bgloc v1.3.69

Weekly downloads
-
License
INFA GmbH
Repository
gitlab
Last release
1 year ago

bglocng17

Background geolocation tracker for internal purposes.

Install

npm install bglocng17
npx cap sync

API

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>
ParamType
options{ value: string; }

Returns: Promise<{ value: string; }>


checkPermissions()

checkPermissions() => Promise<PermissionStatus>

Returns: Promise<PermissionStatus>


requestPermissions()

requestPermissions() => Promise<PermissionStatus>

Returns: Promise<PermissionStatus>


start(...)

start(config: InfaBgLocConfig) => Promise<void>
ParamType
configInfaBgLocConfig

stop()

stop() => Promise<void>

getLocations(...)

getLocations(options: InfaBgLocFetchOptions) => Promise<InfaBgLocationArray>
ParamType
optionsInfaBgLocFetchOptions

Returns: Promise<InfaBgLocationArray>


getStoredLocationsCount()

getStoredLocationsCount() => Promise<InfaBgLocationCount>

Returns: Promise<InfaBgLocationCount>


getAll()

getAll() => Promise<InfaBgLocationArray>

Returns: Promise<InfaBgLocationArray>


confirmReception(...)

confirmReception(options: InfaBgLocConfirmReceptionOptions) => Promise<void>
ParamType
optionsInfaBgLocConfirmReceptionOptions

upload(...)

upload(config: InfaBgLocSessionConfig) => Promise<void>
ParamType
configInfaBgLocSessionConfig

cleanup(...)

cleanup(options?: InfaBgLocCleanupSessionOptions | InfaBgLocCleanupByIdsOptions | undefined) => Promise<void>
ParamType
optionsInfaBgLocCleanupSessionOptions | InfaBgLocCleanupByIdsOptions

addListener(string, ...)

addListener(eventName: string, listenerFunc: ListenerCallback) => Promise<PluginListenerHandle> & PluginListenerHandle
ParamType
eventNamestring
listenerFuncListenerCallback

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


on(...)

on(eventName: string) => Observable<any>
ParamType
eventNamestring

Returns: Observable<any>


Interfaces

PermissionStatus

PropType
locationPermissionState

InfaBgLocConfig

Used to configure the background service

InfaBgLocationArray

PropType
itemsInfaBgLocation[]

InfaBgLocation

PropType
idnumber
sessionTokenstring
timenumber
latitudenumber
longitudenumber
altitudenumber
speednumber
bearingnumber
angularSpeednumber
accuracynumber
verticalAccuracynumber
speedAccuracynumber
bearingAccuracynumber
angularSpeedAccuracynumber
nanosnumber
providerstring
latitudeRawnumber
longitudeRawnumber

InfaBgLocFetchOptions

PropTypeDescriptionDefault
sessionTokenstringSet the session to retrieve the locations for. (required)
limitnumberLimits the number of returned locations and retrieves the oldest entries.null
ignoreTransmissionFlagbooleanGet the entire dataset for this session, regardless of the current app-transmission flag.false

InfaBgLocationCount

PropType
countnumber

InfaBgLocConfirmReceptionOptions

PropTypeDescription
sessionTokenstringSet the session to confirm the reception
idsnumber[]Set the array of ids handled within the application to mark all locations within the native plugin as handled up to this one.

InfaBgLocSessionConfig

PropTypeDescriptionDefault
sessionTokenstring
httpUrlstringIf set, the service will post the recorded locations to the given server url end-point as soon as there is a valid internet connection available. The data will be sent as POST-Method and (actually) without any authorization header. Therefore the end-point should allow anonymous access.null
httpPostTemplatestringDefines the JSON-based template used for sending a location to the server. Please use the following wildcards as desired: - %id% (the auto-incremental identifier for every recorded location) - %sessionToken% (the identifier used for the particular recording session) - %apiSendStatus% (retrieves 0 or 1, whether the location has been flagged to already be sent to the server) - %appSendStatus% (retrieves 0 or 1, whether the location has been flagged to already be collected by the app itself) - %time% (the location's UTC time fix, in milliseconds since epoch (January 1, 1970).) - %latitude% (the latitude, in degrees) - %longitude% (the longitude, in degrees) - %altitude% (the altitude if available, in meters above the WGS 84 reference ellipsoid.) - %speed% (the speed if it is available, in meters/second over ground.) - %bearing% (the bearing, in degrees 0..360) - %horizontalAccuracy% (the estimated horizontal accuracy of this location, radial, in meters.) - %verticalAccuracy% (the estimated vertical accuracy of this location, in meters.) - %speedAccuracy% (the estimated speed accuracy of this location, in meters per second.) - %bearingAccuracy% (the estimated bearing accuracy of this location, in degrees.) - %nanos% (the time of this fix, in elapsed real-time since system boot.) - %provider% (the name of the provider that generated this fix.)
httpAuthenticationstring
httpPostLimitnumberDefines the number of locations maximal sent to the server at once.MAX_INTEGER
httpPostFrequencynumberDefines the server upload frequency in milliseconds.10000
idleTimeUntilNotificationnumberWhen the location has not changed during the given amount of milliseconds, the service returns a notification. The default time is 4620000
waitForClientCollectionbooleanIndicates, whether a location shall wait for the client to be collected, before it can be (regularly) cleared from the storage.
backgroundServicebooleanAllows the service to persist in the background, although the main app itself might have been shut down already.false

InfaBgLocCleanupSessionOptions

PropTypeDescriptionDefault
sessionTokenstringThe session to be cleaned up. (required)
minSessionAgenumberDefines the minimum age of the session in days, before it can be discarded. A value of 0 allows the service to immediately delete the location.0
forceCleanupbooleanAll locations have to be posted to a server (through HTTP-POST) by the native upload client, before any location of the session will be deleted.true

InfaBgLocCleanupByIdsOptions

PropTypeDescription
idsnumber[]The ids to be cleaned up.

PluginListenerHandle

PropType
remove() => Promise<void>

Type Aliases

PermissionState

'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'

ListenerCallback

(err: any, ...args: any[]): void

1.3.64

1 year ago

1.3.65

1 year ago

1.3.68

1 year ago

1.3.69

1 year ago

1.3.66

1 year ago

1.3.67

1 year ago

1.3.62

1 year ago

1.3.57

1 year ago

1.3.58

1 year ago

1.3.55

1 year ago

1.3.56

1 year ago

1.3.59

1 year ago

1.3.61

1 year ago

1.3.54

1 year ago

1.4.4-beta

3 years ago

1.4.3-beta

3 years ago

1.4.2-beta

3 years ago

1.4.1-beta

3 years ago

1.4.0-beta

3 years ago

1.3.53

3 years ago

1.3.51

3 years ago

1.3.52

3 years ago

1.3.50

4 years ago

1.3.35

4 years ago

1.3.36

4 years ago

1.3.39

4 years ago

1.3.37

4 years ago

1.3.38

4 years ago

1.3.42

4 years ago

1.3.43

4 years ago

1.3.40

4 years ago

1.3.41

4 years ago

1.3.46

4 years ago

1.3.47

4 years ago

1.3.44

4 years ago

1.3.45

4 years ago

1.3.48

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.9

4 years ago

1.2.0

4 years ago

1.2.8

4 years ago

1.2.7

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.1.10

4 years ago

1.1.9

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.39

4 years ago

1.0.38

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.0.40

4 years ago

1.0.41

4 years ago

1.0.37

4 years ago

1.0.36

4 years ago

1.0.35

4 years ago

1.0.34

4 years ago

1.0.33

4 years ago

1.0.32

4 years ago

1.0.31

4 years ago

1.0.30

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago