UNPKG

cordova-background-geolocation-lt

Version:

Cordova / Capacitor Background Geolocation. The most sophisticated, cross-platform location-tracking and geofencing plugin with battery-conscious motion-detection intelligence.

35 lines (34 loc) 1.06 kB
declare module "cordova-background-geolocation-lt" { /** * The event-object provided to [[BackgroundGeolocation.onAuthorization]] * * @example * ```typescript * BackgroundGeolocation.onAuthorization(authorizationEvent => { * if (authorizationEvent.success) { * console.log("[authorization] SUCCESS: ", authorizationEvent.response); * else { * console.log("[authorization] FAILURE: ", authorizationEvent.error); * } * }); * ``` */ interface AuthorizationEvent { /** * HTTP Status returned from your [[Authorization.refreshUrl]] (or `0` if the HTTP request failed). */ status:number; /** * `true` when an authorization request to [[Authorization.refreshUrl]] was successful. */ success: boolean; /** * When [[success]] is `false`, this is the error message from [[Authorization.refreshUrl]]. Otherwise, `null`. */ error: string; /** * when [[success]] is `true`, this is the decoded JSON response returned from [[Authorization.refreshUrl]]. Otherwise, `null`. */ response:any; } }