From ccf7fb56c8d87c82bb56c2c80bf44a5ed9fd380b Mon Sep 17 00:00:00 2001 From: Alex Muramoto Date: Sun, 31 Jul 2016 13:30:48 -0500 Subject: [PATCH] fix(diagnostics): Corrects isEnabled functions to isAvailable (#373) - Location, camera, wifi, and bluetooth 'isEnabled' functions are incorrect. All should be is Available. --- src/plugins/diagnostic.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/diagnostic.ts b/src/plugins/diagnostic.ts index 18a0bf3b6..1c68370dd 100644 --- a/src/plugins/diagnostic.ts +++ b/src/plugins/diagnostic.ts @@ -20,28 +20,28 @@ export class Diagnostic { * Checks if app is able to access device location. */ @Cordova() - static isLocationEnabled(): Promise { return; } + static isLocationAvailable(): Promise { return; } /** * Checks if Wifi is connected/enabled. On iOS this returns true if the device is connected to a network by WiFi. On Android and Windows 10 Mobile this returns true if the WiFi setting is set to enabled. * On Android this requires permission. `` */ @Cordova() - static isWifiEnabled(): Promise { return; } + static isWifiAvailable(): Promise { return; } /** * Checks if the device has a camera. On Android this returns true if the device has a camera. On iOS this returns true if both the device has a camera AND the application is authorized to use it. On Windows 10 Mobile this returns true if both the device has a rear-facing camera AND the * application is authorized to use it. */ @Cordova() - static isCameraEnabled(): Promise { return; } + static isCameraAvailable(): Promise { return; } /** * Checks if the device has Bluetooth capabilities and if so that Bluetooth is switched on (same on Android, iOS and Windows 10 Mobile) * On Android this requires permission */ @Cordova() - static isBluetoothEnabled(): Promise { return; } + static isBluetoothAvailable(): Promise { return; } /** * Returns the location authorization status for the application.