Diagnostic

Improve this doc

$ ionic plugin add cordova.plugins.diagnostic

Repo:

Static Methods

isLocationEnabled()

Checks if app is able to access device location.

isWifiEnabled()

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

isCameraEnabled()

isBluetoothEnabled()

requestLocationAuthorization()

isLocationAuthorized()

isCameraPresent()

isCameraAuthorized()

isGpsLocationEnabled()

isNetworkLocationEnabled()

isRemoteNotificationsEnabled()

Checks if remote (push) notifications are enabled. On iOS 8+, returns true if app is registered for remote notifications AND “Allow Notifications” switch is ON AND alert style is not set to “None” (i.e. “Banners” or “Alerts”). On iOS <=7, returns true if app is registered for remote notifications AND alert style is not set to “None” (i.e. “Banners” or “Alerts”) - same as isRegisteredForRemoteNotifications().

isRegisteredForRemoteNotifications()

Indicates if the app is registered for remote (push) notifications on the device. On iOS 8+, returns true if the app is registered for remote notifications and received its device token, or false if registration has not occurred, has failed, or has been denied by the user. Note that user preferences for notifications in the Settings app will not affect this. On iOS <=7, returns true if app is registered for remote notifications AND alert style is not set to “None” (i.e. “Banners” or “Alerts”) - same as isRemoteNotificationsEnabled().

API

Native

General