diff --git a/CHANGELOG.md b/CHANGELOG.md index 82b235c..891fecd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## 3.3.0 - 2016-03-23 +- Add support for requestLocation + ## 3.2.0 - 2016-03-23 - Add support for writeQ diff --git a/README.md b/README.md index 5b21ee4..0af12fd 100755 --- a/README.md +++ b/README.md @@ -127,6 +127,7 @@ For details on each function, please visit https://github.com/randdusing/cordova * $cordovaBluetoothLE.hasPermission().then(success, error); **Android 6.0+** * $cordovaBluetoothLE.requestPermission().then(success, error); **Android 6.0+** * $cordovaBluetoothLE.isLocationEnabled().then(success, error); **Android 6.0+** +* $cordovaBluetoothLE.requestLocation().then(success, error); **Android 6.0+** * $cordovaBluetoothLE.encodedStringToBytes(encodedString); * $cordovaBluetoothLE.bytesToEncodedString(bytes); * $cordovaBluetoothLE.stringToBytes(string); diff --git a/bower.json b/bower.json index 1433ce0..0528cba 100755 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "ng-cordova-bluetoothle", "main": "./ng-cordova-bluetoothle.js", - "version": "3.2.0", + "version": "3.3.0", "description": "AngularJS Wrapper for Phonegap / Cordova Bluetooth LE Plugin", "authors": [ "George Stocker ", diff --git a/ng-cordova-bluetoothle.js b/ng-cordova-bluetoothle.js index 4d67caf..5816091 100644 --- a/ng-cordova-bluetoothle.js +++ b/ng-cordova-bluetoothle.js @@ -662,6 +662,23 @@ angular.module('ngCordovaBluetoothLE', []).factory('$cordovaBluetoothLE', ['$q', return q.promise; }; + var requestLocation = function() { + var q = $q.defer(); + if (window.bluetoothle === undefined) { + q.reject(errorUnsupported); + } else { + window.bluetoothle.requestLocation( + function(obj) { + q.resolve(obj); + }, + function(obj) { + q.reject(obj); + } + ); + } + return q.promise; + }; + var encodedStringToBytes = function(value) { if (window.bluetoothle === undefined) { @@ -737,6 +754,7 @@ angular.module('ngCordovaBluetoothLE', []).factory('$cordovaBluetoothLE', ['$q', hasPermission: hasPermission, requestPermission: requestPermission, isLocationEnabled: isLocationEnabled, + requestLocation: requestLocation, encodedStringToBytes: encodedStringToBytes, bytesToEncodedString: bytesToEncodedString, diff --git a/package.json b/package.json index c80d990..6e7bd9d 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ng-cordova-bluetoothle", - "version": "3.2.0", + "version": "3.3.0", "description": "AngularJS Wrapper for Phonegap / Cordova Bluetooth LE Plugin", "author": { "name": "George Stocker",