Skip to content
Dave Alden edited this page Jun 23, 2016 · 10 revisions

v3.1.0

NOTE: This version contains backwardly-incompatible renaming of some functions. Either fix the version of the plugin in your config.xml to [email protected] or update your code to use the revised names below.

  • Revised function names to logically separate those which check if device OS setting is enabled (isSomethingEnabled()) vs those which check if hardware/sensor is available for use by the app (device OS setting is enabled AND app has authorisation AND hardware is present - isSomethingAvailable()).
    • Renamed isLocationEnabled() => isLocationAvailable() (Android, iOS and Windows 10 Mobile) - if location is available to app
    • Renamed isLocationEnabledSetting() => isLocationEnabled() (iOS) - if device setting for location is enabled
    • Added isLocationEnabled() (Android) - if device setting for location is enabled
    • Renamed isCameraEnabled() => isCameraAvailable() (Android, iOS and Windows 10 Mobile) - if camera is available to app
    • Renamed isBluetoothEnabled() => isBluetoothAvailable() (Android, iOS and Windows 10 Mobile) - if Bluetooth is available to app
    • Added isBluetoothEnabled() (Android) - if the device setting for Bluetooth is enabled
    • Renamed isGpsLocationEnabled() => isGpsLocationAvailable() (Android) - if GPS location is available to app
    • Added isGpsLocationEnabled() (Android) - if device setting for GPS location is enabled
    • Renamed isNetworkLocationEnabled() => isNetworkLocationAvailable() (Android) - if network location is available to app
    • Added isNetworkLocationEnabled() (Android) - if device setting for network location is enabled

v3.0.3

  • Fix for #80, where change in Location Mode on Android would cause exception if plugin has not been initialised by a call from JS.

v3.0.2

  • Updated plugin and documentation to explicitly support only Windows 10 Mobile (and not Windows Phone 8.x)

v3.0.1

  • Fixed Android issues for apps not using Bluetooth state listening

v3.0.0

  • Added permissions management for Contacts and Calendar to Android & iOS
  • Added permissions management for Reminders to iOS
  • Enable registration of listeners to be notified of location and Bluetooth state changes on Android and iOS
  • Replace string literals returned with constants

Backward-incompatibility with v2

In order to make cross-platform use of the shared plugin functions easier, some backwardly-incompatible changes have been made to existing API functions.

To avoid breaking existing code which uses the old API syntax, you can continue to use the v2 API by specifying the plugin version when adding it: cordova.plugins.diagnostic@2

v3 contains the following backwardly-incompatible changes:

iOS:

  • requestCameraAuthorization() and requestMicrophoneAuthorization(): success callback is now passed a {string} referencing the permissionStatus constants instead of a {boolean}

v2.3.16

  • Update Android variant of camera authorization methods to request CAMERA permission in addition to READ_EXTERNAL_STORAGE. This is due to permission changes in [email protected].

v2.3.15

  • Add checks for Bluetooth Low Energy (LE) and Bluetooth LE Peripheral Mode to Android
  • Fix bug causing getMicrophoneAuthorizationStatus() to always return NOT_DETERMINED

v2.3.14

  • Add support for checking and requesting microphone access to Android and iOS
  • Document current quirks with requestCameraAuthorization() on Android.

v2.3.13

  • Fix erroneous reference to invalidPermissions. Fixes #42.
  • Document deprecation of registerLocationAuthorizationStatusChangeHandler()

v2.3.12

  • Simplify the handling of user response to location authorization request on iOS. Fixes #35.

v2.3.11

  • Callback to JS in WebView-agnostic way from iOS native
  • Change so only one location permission type is needed more location to be authorized on Android
  • Robustify check for UIApplicationOpenSettingsURLString. Fixes #34.
  • Update docs regarding requestLocationAuthorization on iOS vs Android. Improves #35 but doesn't entirely fix it.
  • Fixed requestCameraAuthorization returning DENIED_ALWAYS when access is granted on Android

v2.3.10

  • Update documentation regarding Android API version and legacy API 22 branch

v2.3.9

  • Ensure plugin methods return boolean true/false (not integer 0/1). Fixes #28.

v2.3.0

This version updates the plugin to support Android 6 (API 23) runtime permissions.

In order to do this it must depend on libraries only present in API 23+, so you must build using Android SDK Platform v23 or above. To do this you must have Cordova Android platform@5.0.0 or above installed in your project. You can check the currently installed platform versions with the following command:

cordova platform ls

Currently the default version installed (if not specified) is cordova-android@4 which uses API 22, so you need to explicitly specify the version when adding the platform:

cordova platform add [email protected]

Note: Attempting to build with API 22 or below will result in a build error.

You must also make sure your build environment has the following Android libraries installed. In a local build environment, you'd install these via the Android SDK Manager:

  • Android Support Library - Rev. 23 or above
  • Android Support Repository - Rev. 23 or above
Clone this wiki locally