Options
All
  • Public
  • Public/Protected
  • All
Menu

React Native Background Geolocation

Index

Type aliases

AccuracyAuthorization

AccuracyAuthorization: 0 | 1

ActivityType

ActivityType: 1 | 2 | 3 | 4

AuthorizationStatus

AuthorizationStatus: 0 | 1 | 2 | 3 | 4

Event

Event: "boot" | "terminate" | "location" | "motionchange" | "http" | "heartbeat" | "providerchange" | "activitychange" | "geofence" | "geofenceschange" | "enabledchange" | "connectvitychange" | "schedule" | "powersavechange" | "notificationaction" | "authorization"

Recognized event names available as constants upon the BackgroundGeolocation class.

// eg
BackgroundGeolocation.EVENT_LOCATION)
> "location"

BackgoundGeolocation.EVENT_MOTIONCHANGE;
> "motionchange"

Name Value
EVENT_BOOT boot
EVENT_TERMINATE terminate
EVENT_LOCATION location
EVENT_MOTIONCHANGE motionchange
EVENT_HTTP http
EVENT_HEARTBEAT heartbeat
EVENT_PROVIDERCHANGE providerchange
EVENT_ACTIVITYCHANGE activitychange
EVENT_GEOFENCE geofence
EVENT_GEOFENCESCHANGE geofenceschange
EVENT_ENABLEDCHANGE enabledchange
EVENT_CONNECTIVITYCHANGE connectivitychange
EVENT_SCHEDULE schedule
EVENT_POWERSAVECHANGE powersavechange
EVENT_NOTIFICATIONACTION notificationaction
EVENT_AUTHORIZATION authorization

Extras

Extras: {}

Type declaration

  • [key: string]: string | null | number | boolean | Extras | string[] | number[] | number[][] | boolean[] | Extras[]

HttpMethod

HttpMethod: "POST" | "PUT" | "OPTIONS"

Desired HTTP method to use when uploading data to your configured Config.url.

LocationAccuracy

LocationAccuracy: -2 | -1 | 0 | 10 | 100 | 1000 | 3000
Name Location Providers Description
DESIRED_ACCURACY_NAVIGATION (iOS only) GPS + Wifi + Cellular Highest power; highest accuracy.
DESIRED_ACCURACY_HIGH GPS + Wifi + Cellular Highest power; highest accuracy.
DESIRED_ACCURACY_MEDIUM Wifi + Cellular Medium power; Medium accuracy;
DESIRED_ACCURACY_LOW Wifi (low power) + Cellular Lower power; No GPS.
DESIRED_ACCURACY_VERY_LOW Cellular only Lowest power; lowest accuracy.
DESIRED_ACCURACY_LOWEST (iOS only) Lowest power; lowest accuracy.

LocationAuthorizationRequest

LocationAuthorizationRequest: "Always" | "WhenInUse" | "Any"

iOS Location authorization request. This is used to express the location authorization you expect the user have enabled.

LocationError

LocationError: 0 | 1 | 2 | 3 | 408 | 499

When native location API fails to fetch a location, one of the following error-codes will be returned.

Code Error
0 Location unknown
1 Location permission denied
2 Network error
3 Attempt to initiate location-services in background with WhenInUse authorization
408 Location timeout
499 Location request cancelled

LogLevel

LogLevel: 0 | 1 | 2 | 3 | 4 | 5

Controls the volume of Config.logLevel log-entries recorded to database.

Label
LOG_LEVEL_OFF
LOG_LEVEL_ERROR
LOG_LEVEL_WARNING
LOG_LEVEL_INFO
LOG_LEVEL_DEBUG
LOG_LEVEL_VERBOSE

Map

Map: {}

Type declaration

  • [key: string]: string | null | number | boolean | Map | string[] | number[] | number[][] | boolean[] | Map[]

MotionActivityType

MotionActivityType: "unknown" | "still" | "walking" | "on_foot" | "running" | "on_bicycle" | "in_vehicle"

List of valid Motion-activity types

Activity Name
still
walking
on_foot
running
on_bicycle
in_vehicle
unknown

NotificationPriority

NotificationPriority: 0 | 1 | -1 | 2 | -2
Value Description
NOTIFICATION_PRIORITY_DEFAULT Notification weighted to top of list; notification-bar icon weighted left.
NOTIFICATION_PRIORITY_HIGH Notification strongly weighted to top of list; notification-bar icon strongly weighted to left.
NOTIFICATION_PRIORITY_LOW Notification weighted to bottom of list; notification-bar icon weighted right.
NOTIFICATION_PRIORITY_MAX Same as NOTIFICATION_PRIORITY_HIGH.
NOTIFICATION_PRIORITY_MIN Notification strongly weighted to bottom of list; notification-bar icon hidden.

PersistMode

PersistMode: -1 | 0 | 1 | 2

SQLQueryOrder

SQLQueryOrder: -1 | 1

Controls ordering of SQLQuery.order

Name Value
Logger.ORDER_ASC 1
Logger.ORDER_DESC -1

TrackingMode

TrackingMode: 0 | 1
Value Description
0 Geofences-only monitoring (BackgroundGeolocation.startGeofences).
1 Both location & Geofence monitoring.

Vertices

Vertices: number[][]

Generated using TypeDoc