From e9c0715283d2f745599c85b4fc59a16777498e16 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Mon, 13 Sep 2021 12:53:19 -0500 Subject: [PATCH] Removed magnetometer - unused --- .../plugins/magnetometer/index.ts | 91 ------------------- 1 file changed, 91 deletions(-) delete mode 100644 src/@ionic-native/plugins/magnetometer/index.ts diff --git a/src/@ionic-native/plugins/magnetometer/index.ts b/src/@ionic-native/plugins/magnetometer/index.ts deleted file mode 100644 index 223765cf6..000000000 --- a/src/@ionic-native/plugins/magnetometer/index.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; -import { Observable } from 'rxjs'; - -export interface MagnetometerReading { - /** - * X reading of magnetometer. (Number) - */ - x: number; - - /** - * Y reading of magnetometer. (Number) - */ - y: number; - - /** - * Z reading of magnetometer. (Number) - */ - z: number; - - /** - * Calculated total - always positive of magnetometer. (Number) - */ - magnitude: number; -} - -/** - * @name Device eMagnetometer - * @description - * Requires Cordova plugin: `cordova-plugin-magnetometer`. For more info, please see the [Device Orientation docs](https://github.com/sdesalas/cordova-plugin-magnetometer). - * - * @usage - * ```typescript - * // DeviceOrientationCompassHeading is an interface for compass - * import { Magnetometer, MagnetometerReading } from '@ionic-native/device-orientation/ngx'; - * - * constructor(private magnetometer: Magnetometer) { } - * - * ... - * - * // Get the device current compass heading - * this.deviceOrientation.getReading().then( - * (data: MagnetometerReading) => console.log(data), - * (error: any) => console.log(error) - * ); - * - * // Watch the device compass heading change - * var subscription = this.deviceOrientation.watchReadings().subscribe( - * (data: MagnetometerReading) => console.log(data) - * ); - * - * // Stop watching heading change - * subscription.unsubscribe(); - * ``` - * @interfaces - * MagnetometerReading - */ -@Plugin({ - pluginName: 'Magnetometer', - plugin: 'cordova-plugin-magnetometer', - pluginRef: 'cordova.plugins.magnetometer', - repo: 'https://github.com/sdesalas/cordova-plugin-magnetometer', - platforms: ['Android', 'iOS'], -}) -@Injectable() -export class Magnetometer extends IonicNativePlugin { - /** - * Get the current compass reading. - * @returns {Promise} - */ - @Cordova() - getReading(): Promise { - return; - } - - /** - * Get the device current heading at a regular interval - * - * Stop the watch by unsubscribing from the observable - * @param {DeviceOrientationCompassOptions} [options] Options for compass. Frequency and Filter. Optional - * @returns {Observable} Returns an observable that contains the compass heading - */ - @Cordova({ - callbackOrder: 'reverse', - observable: true, - clearFunction: 'stop', - }) - watchReadings(): Observable { - return; - } -}