import { BackgroundGeolocation } from '@ionic-native/background-geolocation' ; import { Observable } from 'rxjs/Observable' ; import { Observer } from 'rxjs/Observer' ; export interface BackgroundGeolocationResponse { /**
     * ID of location as stored in DB (or null)
     */ locationId : number ; /**
     * Service provider
     */ serviceProvider : string ; /**
     * true if location recorded as part of debug
     */ debug : boolean ; /**
     * UTC time of this fix, in milliseconds since January 1, 1970.
     */ time : number ; /**
     * latitude, in degrees.
     */ latitude : number ; /**
     * longitude, in degrees.
     */ longitude : number ; /**
     * estimated accuracy of this location, in meters.
     */ accuracy : number ; /**
     * speed if it is available, in meters/second over ground.
     */ speed : number ; /**
     * altitude if available, in meters above the WGS 84 reference ellipsoid.
     */ altitude : number ; /**
      * accuracy of the altitude if available.
      */ altitudeAccuracy : number ; /**
     * bearing, in degrees.
     */ bearing : number ; /**
     * A Coordinates object defining the current location
     */ coords : Coordinates ; /**
     * A timestamp representing the time at which the location was retrieved.
     */ timestamp : number ; } export interface BackgroundGeolocationConfig { /**
     * Desired accuracy in meters. Possible values [0, 10, 100, 1000]. The lower
     * the number, the more power devoted to GeoLocation resulting in higher
     * accuracy readings. 1000 results in lowest power drain and least accurate
     * readings. @see Apple docs (https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/index.html#//apple_ref/occ/instp/CLLocationManager/desiredAccuracy)
     */ desiredAccuracy : number ; /**
     * Stationary radius in meters. When stopped, the minimum distance the device
     * must move beyond the stationary location for aggressive background-tracking
     * to engage.
     */ stationaryRadius : number ; /**
     * When enabled, the plugin will emit sounds for life-cycle events of
     * background-geolocation! See debugging sounds table.
     */ debug ? : boolean ; /**
     * The minimum distance (measured in meters) a device must move horizontally
     * before an update event is generated. @see Apple docs. (https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html#//apple_ref/occ/instp/CLLocationManager/distanceFilter)
     */ distanceFilter : number ; /**
     * IOS, ANDROID ONLY
     * Enable this in order to force a stop() when the application terminated
     * (e.g. on iOS, double-tap home button, swipe away the app).o
     *
     * Defaults to true
     */ stopOnTerminate ? : boolean ; /**
  
     * ANDROID ONLY
  
     * Start background service on device boot.
  
     *
     * Defaults to false
  
     */ startOnBoot ? : boolean ; /**
  
     * ANDROID ONLY
  
     * If false location service will not be started in foreground and no notification will be shown.
     *
     * Defaults to true
  
     */ startForeground ? : boolean ; see Android see Android interval ? : number ; /**
     * ANDROID ONLY
     * Custom notification title in the drawer.
     */ notificationTitle ? : string ; /**
     * ANDROID ONLY
     * Custom notification text in the drawer.
     */ notificationText ? : string ; /**
     * ANDROID ONLY
     * The accent color to use for notification. Eg. #4CAF50.
     */ notificationIconColor ? : string ; /**
  
     * ANDROID ONLY
  
     * The filename of a custom notification icon. See android quirks.
  
     * NOTE: Only available for API Level >=21.
  
     */ notificationIconLarge ? : string ; /**
  
     * ANDROID ONLY
  
     * The filename of a custom notification icon. See android quirks.
  
     * NOTE: Only available for API Level >=21.
  
     */ notificationIconSmall ? : string ; /**
     * ANDROID ONLY
     * Set location service provider @see wiki (https://github.com/mauron85/cordova-plugin-background-geolocation/wiki/Android-providers)
     */ locationProvider ? : number ; /**
     * IOS ONLY
     * [AutomotiveNavigation, OtherNavigation, Fitness, Other] Presumably,
     * this affects iOS GPS algorithm. @see Apple docs for more information
     * (https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html#//apple_ref/occ/instp/CLLocationManager/activityType)
     */ activityType ? : string ; /**
  
     * IOS ONLY
  
     * Pauses location updates when app is paused
  
     *
     * Defaults to true
  
     */ pauseLocationUpdates ? : boolean ; see https url ? : string ; see https syncUrl ? : string ; /**
     * Specifies how many previously failed locations will be sent to server at once
  
     *
     * Defaults to 100
  
     */ syncThreshold ? : number ; /**
  
     * Optional HTTP headers sent along in HTTP request
  
     */ httpHeaders ? : any ; /**
     * IOS ONLY
  
     * Switch to less accurate significant changes and region monitory when in background (default)
     *
     * Defaults to 100
  
     */ saveBatteryOnBackground ? : boolean ; /**
  
     * Limit maximum number of locations stored into db
  
     *
     * Defaults to 10000
  
     */ maxLocations ? : number ; see Android fastestInterval ? : number ; /**
     * ANDROID ONLY with BackgroundGeolocation.LocationProvider.ANDROID_ACTIVITY_PROVIDER
     *
     * Rate in milliseconds at which activity recognition occurs. Larger values will result in fewer activity detections while improving battery life.
     */ activitiesInterval ? : number ; /**
     * ANDROID ONLY with BackgroundGeolocation.LocationProvider.ANDROID_ACTIVITY_PROVIDER
     *
     * stop() is forced, when the STILL activity is detected (default is true)
     */ stopOnStillActivity ? : boolean ; } export class BackgroundGeolocatioMock extends BackgroundGeolocation { enum { number } LocationProvider : any ; /**
     * Desired accuracy in meters. Possible values [0, 10, 100, 1000].
  
     * The lower the number, the more power devoted to GeoLocation resulting in higher accuracy readings.
  
     * 1000 results in lowest power drain and least accurate readings.
  
     *
     * Possible values:
     *  HIGH: 0
  
     *  MEDIUM: 10
  
     *  LOW: 100
  
     *  PASSIVE: 1000
     *
     * enum {number}
  
     */ Accuracy : any ; enum { number } Mode : any ; param options { BackgroundGeolocationConfig } return { Observable < BackgroundGeolocationResponse > } configure ( options ) { return Observable . create ( ( observer ) => { let response ; observer . next ( response ) ; observer . complete ( ) ; } ) ; } ; returns { Promise < any > } start ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } stop ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } finish ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param isMoving { boolean } returns { Promise < any > } changePace ( isMoving ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param options { BackgroundGeolocationConfig } returns { Promise < any > } setConfig ( options ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < Location > } getStationaryLocation ( ) { let response ; return new Promise ( ( resolve , reject ) => { resolve ( response ) ; } ) ; } ; returns { Promise < any > } onStationary ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < number > } isLocationEnabled ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; /**
     * Display app settings to change permissions
     */ showAppSettings ( ) { } ; /**
     * Display device location settings
     */ showLocationSettings ( ) { } ; returns { Promise < boolean > } watchLocationMode ( ) { return Observable . create ( ( observer ) => { let response ; observer . next ( response ) ; observer . complete ( ) ; } ) ; } ; returns { Promise < any > } stopWatchingLocationMode ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } getLocations ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } getValidLocations ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param locationId { number } returns { Promise < any > } deleteLocation ( locationId ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Promise < any > } deleteAllLocations ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param modeId { number } returns { Promise < any > } switchMode ( modeId ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; see https param limit { number } returns { Promise < any > } getLogEntries ( limit ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; }