npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

infa-bgloc

v1.3.62

Published

INFA-Background Geolocation

Downloads

307

Readme

bglocng17

Background geolocation tracker for internal purposes.

Install

npm install bglocng17
npx cap sync

API

echo(...)

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

| Param | Type | | ------------- | ------------------------------- | | 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>

| Param | Type | | ------------ | ----------------------------------------------------------- | | config | InfaBgLocConfig |


stop()

stop() => Promise<void>

getLocations(...)

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

| Param | Type | | ------------- | ----------------------------------------------------------------------- | | options | InfaBgLocFetchOptions |

Returns: Promise<InfaBgLocationArray>


getStoredLocationsCount()

getStoredLocationsCount() => Promise<InfaBgLocationCount>

Returns: Promise<InfaBgLocationCount>


getAll()

getAll() => Promise<InfaBgLocationArray>

Returns: Promise<InfaBgLocationArray>


confirmReception(...)

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

| Param | Type | | ------------- | --------------------------------------------------------------------------------------------- | | options | InfaBgLocConfirmReceptionOptions |


upload(...)

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

| Param | Type | | ------------ | ------------------------------------------------------------------------- | | config | InfaBgLocSessionConfig |


cleanup(...)

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

| Param | Type | | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | options | InfaBgLocCleanupSessionOptions | InfaBgLocCleanupByIdsOptions |


addListener(string, ...)

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

| Param | Type | | ------------------ | ------------------------------------------------------------- | | eventName | string | | listenerFunc | ListenerCallback |

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


on(...)

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

| Param | Type | | --------------- | ------------------- | | eventName | string |

Returns: Observable<any>


Interfaces

PermissionStatus

| Prop | Type | | -------------- | ----------------------------------------------------------- | | location | PermissionState |

InfaBgLocConfig

Used to configure the background service

InfaBgLocationArray

| Prop | Type | | ----------- | ----------------------------- | | items | InfaBgLocation[] |

InfaBgLocation

| Prop | Type | | -------------------------- | ------------------- | | id | number | | sessionToken | string | | time | number | | latitude | number | | longitude | number | | altitude | number | | speed | number | | bearing | number | | angularSpeed | number | | accuracy | number | | verticalAccuracy | number | | speedAccuracy | number | | bearingAccuracy | number | | angularSpeedAccuracy | number | | nanos | number | | provider | string | | latitudeRaw | number | | longitudeRaw | number |

InfaBgLocFetchOptions

| Prop | Type | Description | Default | | ---------------------------- | -------------------- | ----------------------------------------------------------------------------------------- | ------------------ | | sessionToken | string | Set the session to retrieve the locations for. (required) | | | limit | number | Limits the number of returned locations and retrieves the oldest entries. | null | | ignoreTransmissionFlag | boolean | Get the entire dataset for this session, regardless of the current app-transmission flag. | false |

InfaBgLocationCount

| Prop | Type | | ----------- | ------------------- | | count | number |

InfaBgLocConfirmReceptionOptions

| Prop | Type | Description | | ------------------ | --------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | sessionToken | string | Set the session to confirm the reception | | ids | number[] | Set the array of ids handled within the application to mark all locations within the native plugin as handled up to this one. |

InfaBgLocSessionConfig

| Prop | Type | Description | Default | | ------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------ | | sessionToken | string | | | | httpUrl | string | If 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 | | httpPostTemplate | string | Defines 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.) | | | httpAuthentication | string | | | | httpPostLimit | number | Defines the number of locations maximal sent to the server at once. | MAX_INTEGER | | httpPostFrequency | number | Defines the server upload frequency in milliseconds. | 10000 | | idleTimeUntilNotification | number | When the location has not changed during the given amount of milliseconds, the service returns a notification. The default time is 4620000 | | | waitForClientCollection | boolean | Indicates, whether a location shall wait for the client to be collected, before it can be (regularly) cleared from the storage. | | | backgroundService | boolean | Allows the service to persist in the background, although the main app itself might have been shut down already. | false |

InfaBgLocCleanupSessionOptions

| Prop | Type | Description | Default | | ------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------- | | sessionToken | string | The session to be cleaned up. (required) | | | minSessionAge | number | Defines 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 | | forceCleanup | boolean | All 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

| Prop | Type | Description | | --------- | --------------------- | ------------------------- | | ids | number[] | The ids to be cleaned up. |

PluginListenerHandle

| Prop | Type | | ------------ | ----------------------------------------- | | remove | () => Promise<void> |

Type Aliases

PermissionState

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

ListenerCallback

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