Skip to content

Commit

Permalink
fix(diagnostics): Corrects isEnabled functions to isAvailable (#373)
Browse files Browse the repository at this point in the history
- Location, camera, wifi, and bluetooth 'isEnabled' functions are incorrect. All should be is Available.
  • Loading branch information
amuramoto authored and ihadeed committed Jul 31, 2016
1 parent eeb5393 commit ccf7fb5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/diagnostic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ccf7fb5

Please sign in to comment.