Skip to content

Commit

Permalink
prepare 4.1.0
Browse files Browse the repository at this point in the history
prepare for 4.1.0 release and fix startScan null params issue
  • Loading branch information
randdusing committed Jul 9, 2016
1 parent 88e8e70 commit c029ab6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
## master - 2016-05-01
## 4.1.0 - 2016-07-09
- wasConnected helper function
- Improved subscribe with Android. No longer need to specify whether notification or indication
- Read, write, subscribe, unsubscribe, readDescriptor, writeDescriptor queueing for Android [\#263](https://github.com/randdusing/BluetoothLE/issues/263), [\#153](https://github.com/randdusing/BluetoothLE/issues/153)
- Everything now runs on the single WebCore thread with Android. It should prevent issues with race conditions
- Fix issue with writeDescriptor on Android
- Fix issue with UUID validation on iOS
- Fix issue with undefined params obj on startScan on Android.

## 4.0.0 - 2016-03-30
- Update OS X
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-bluetoothle",
"version": "4.0.0",
"version": "4.1.0",
"description": "Use the Bluetooth Low Energy plugin to connect your Cordova app to new Bluetooth devices like heart rate monitors, thermometers, etc...",
"cordova": {
"id": "cordova-plugin-bluetoothle",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" id="cordova-plugin-bluetoothle" version="4.0.0">
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" id="cordova-plugin-bluetoothle" version="4.1.0">
<engines>
<engine name="cordova-plugman" version=">=5.0.0" />
<engine name="cordova-android" version=">=5.0.0" />
Expand Down
6 changes: 5 additions & 1 deletion src/android/BluetoothLePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,10 @@ private synchronized void startScanAction(JSONArray args, CallbackContext callba

//Get the service UUIDs from the arguments
JSONObject obj = getArgsObject(args);
//Default to empty object if null, ideally part of getArgsObject, but not sure how other functions would be affected
if (obj == null) {
obj = new JSONObject();
}
UUID[] uuids = getServiceUuids(obj);

//Save the callback context for reporting back found connections. Also the isScanning flag
Expand All @@ -1065,7 +1069,7 @@ private synchronized void startScanAction(JSONArray args, CallbackContext callba
} else {
/* build the ScanFilters */
ArrayList<ScanFilter> scanFilter = new ArrayList<ScanFilter>();
for (UUID uuid : getServiceUuids(obj)) {
for (UUID uuid : uuids) {
ScanFilter.Builder builder = new ScanFilter.Builder();
builder.setServiceUuid(new ParcelUuid(uuid));
scanFilter.add(builder.build());
Expand Down

0 comments on commit c029ab6

Please sign in to comment.