fix(diagnostics): Corrects isEnabled functions to isAvailable (#373)

- Location, camera, wifi, and bluetooth 'isEnabled' functions are incorrect. All should be is Available.
This commit is contained in:
Alex Muramoto 2016-07-31 13:30:48 -05:00 committed by Ibrahim Hadeed
parent eeb5393a3f
commit ccf7fb56c8

View File

@ -20,28 +20,28 @@ export class Diagnostic {
* Checks if app is able to access device location.
*/
@Cordova()
static isLocationEnabled(): Promise<any> { return; }
static isLocationAvailable(): Promise<any> { 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. `<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />`
*/
@Cordova()
static isWifiEnabled(): Promise<any> { return; }
static isWifiAvailable(): Promise<any> { 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<any> { return; }
static isCameraAvailable(): Promise<any> { 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 <uses-permission android:name="android.permission.BLUETOOTH" />
*/
@Cordova()
static isBluetoothEnabled(): Promise<any> { return; }
static isBluetoothAvailable(): Promise<any> { return; }
/**
* Returns the location authorization status for the application.