From 58b351ce13e40b39b6e12eb8ba2362a70630af3d Mon Sep 17 00:00:00 2001 From: vfdev-5 Date: Sun, 15 May 2016 04:47:35 +0200 Subject: [PATCH] * Fix signatures and bugs --- src/plugins/background-geolocation.ts | 38 +++++++++++++++------------ 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src/plugins/background-geolocation.ts b/src/plugins/background-geolocation.ts index 453b1746..5b296c0f 100644 --- a/src/plugins/background-geolocation.ts +++ b/src/plugins/background-geolocation.ts @@ -217,9 +217,9 @@ export class BackgroundGeolocation { * * Options a json object of type Config */ -// NOT SURE ABOUT THE TYPE OF RETURNED OBJECT -// https://github.com/mauron85/cordova-plugin-background-geolocation/blob/master/src/android/BackgroundGeolocationPlugin.java - @Cordova() + @Cordova({ + callbackOrder: 'reverse' + }) static configure(options: Config): Promise { return; } @@ -228,35 +228,39 @@ export class BackgroundGeolocation { * The user will be tracked whenever they suspend the app. */ @Cordova() - static start(): boolean { return; } + static start() { } /** * Turn OFF background-tracking */ @Cordova() - static stop(): boolean { return; } + static stop(): Promise { return; } /** * Inform the native plugin that you're finished, the background-task may be completed + * Method implemented for IOS */ @Cordova() - static finish(): boolean { return; } + static finish() { } /** * Force the plugin to enter "moving" or "stationary" state + * Used */ @Cordova() - static changePace(isMoving: boolean): boolean { return; } + static changePace(isMoving: boolean) { } /** * Setup configuration */ - @Cordova() - static setConfig(options: Config): boolean { return; } + @Cordova({ + callbackOrder: 'reverse' + }) + static setConfig(options: Config): Promise { return; } // /** // * Returns current stationaryLocation if available. null if not @@ -273,16 +277,16 @@ export class BackgroundGeolocation { /** * Check if location is enabled on the device - * @returns {Promise} Returns a promise with int argument that takes values 0, 1 (true). + * @returns {Promise} Returns a promise with int argument that takes values 0, 1 (true). */ @Cordova() - static isLocationEnabled(): Promise { return; } + static isLocationEnabled(): Promise { return; } /** * Display device location settings */ @Cordova() - static showLocationSettings(): boolean { return; } + static showLocationSettings() { } // /** // * @@ -316,10 +320,10 @@ export class BackgroundGeolocation { // static deleteAllLocations(): boolean { return; } -// /** -// * -// */ -// @Cordova() -// static apply(): boolean { return; } + /** + * + */ + @Cordova() + static apply(destination: Config, source: Config): Config { return; } }