From 125a6bacb3bc05552b2b93be5a03f9b1ea9ab406 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Mon, 13 Sep 2021 10:47:57 -0500 Subject: [PATCH] Removed pedometer --- src/@ionic-native/plugins/pedometer/index.ts | 115 ------------------- 1 file changed, 115 deletions(-) delete mode 100644 src/@ionic-native/plugins/pedometer/index.ts diff --git a/src/@ionic-native/plugins/pedometer/index.ts b/src/@ionic-native/plugins/pedometer/index.ts deleted file mode 100644 index 74cfb0601..000000000 --- a/src/@ionic-native/plugins/pedometer/index.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; -import { Observable } from 'rxjs'; -import { Injectable } from '@angular/core'; - -/** - * Interface of a pedometer data object which is returned by watching for new data or by recieving historical data - */ -export interface IPedometerData { - startDate?: number; - endDate?: number; - numberOfSteps: number; - distance: number; - floorsAscended: number; - floorsDescended: number; -} - -/** - * @name Pedometer - * @description - * Fetch pedestrian-related pedometer data, - * such as step counts and other information about the distance travelled. - * - * @usage - * ```typescript - * import { Pedometer } from '@ionic-native/pedometer/ngx'; - * - * Pedometer.isDistanceAvailable() - * .then((available: boolean) => console.log(available)) - * .catch((error: any) => console.log(error)); - * - * Pedometer.startPedometerUpdates() - * .subscribe((data: IPedometerData) => { - * console.log(data); - * }); - * ``` - */ -@Plugin({ - pluginName: 'Pedometer', - plugin: 'cordova-plugin-pedometer', - pluginRef: 'pedometer', - repo: 'https://github.com/leecrossley/cordova-plugin-pedometer', - platforms: ['Android', 'iOS'], -}) -@Injectable() -export class Pedometer extends IonicNativePlugin { - /** - * Checks if step counting is available. Only works on iOS. - * @return {Promise} Returns a promise that resolves when feature is supported (true) or not supported (false) - */ - @Cordova() - isStepCountingAvailable(): Promise { - return; - } - - /** - * Distance estimation indicates the ability to use step information to supply the approximate distance travelled by the user. - * This capability is not supported on all devices, even with iOS 8. - * Only works on iOS. - * @return {Promise} Returns a promise that resolves when feature is supported (true) or not supported (false) - */ - @Cordova() - isDistanceAvailable(): Promise { - return; - } - - /** - * Floor counting indicates the ability to count the number of floors the user walks up or down using stairs. - * This capability is not supported on all devices, even with iOS 8. - * Only works on iOS. - * @return {Promise} Returns a promise that resolves when feature is supported (true) or not supported (false) - */ - @Cordova() - isFloorCountingAvailable(): Promise { - return; - } - - /** - * Starts the delivery of recent pedestrian-related data to your Cordova app. - * - * When the app is suspended, the delivery of updates stops temporarily. - * Upon returning to foreground or background execution, the pedometer object begins updates again. - * @return {Observable} Returns a Observable that recieves repeatly data from pedometer in background. - */ - @Cordova({ - observable: true, - clearFunction: 'stopPedometerUpdates', - }) - startPedometerUpdates(): Observable { - return; - } - - /** - * Stops the delivery of recent pedestrian data updates to your Cordova app. - * @return {Promise} Returns a promise that resolves when pedometer watching was stopped - */ - @Cordova() - stopPedometerUpdates(): Promise { - return; - } - - /** - * Retrieves the data between the specified start and end dates. - * The startDate and endDate options are required and can be constructed in any valid JavaScript way - * (e.g. new Date(2015, 4, 1, 15, 20, 00) is also valid, as is milliseconds). - * Only works on iOS. - * @param {any} options start date and en date where you want to get pedometer data - * @return {Promise} Returns a promise that resolves when pedometer data found - */ - @Cordova({ - callbackOrder: 'reverse', - }) - queryData(options: { startDate: Date; endDate: Date }): Promise { - return; - } -}