Skip to content

Commit b91419c

Browse files
committed
Merge pull request #261 from randdusing/queue
Queue
2 parents 34b4cdb + 40d709d commit b91419c

File tree

5 files changed

+313
-483
lines changed

5 files changed

+313
-483
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## master - 2016-03-30
2+
- wasConnected helper function
3+
- Improved subscribe with Android. No longer need to specify whether notification or indication
4+
- Read/write queueing for Android
5+
- Everything now runs on the single WebCore thread with Android. It should prevent issues with race conditions. I still need to verify there are no changes in performance.
6+
17
## 4.0.0 - 2016-03-30
28
- Update OS X
39
- Fix initializePeripheral issue when not passing parameters on iOS.

plugin.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
</feature>
2020
</config-file>
2121
<source-file src="src/android/BluetoothLePlugin.java" target-dir="src/com/randdusing/bluetoothle" />
22+
<source-file src="src/android/Operation.java" target-dir="src/com/randdusing/bluetoothle" />
2223
<config-file target="AndroidManifest.xml" parent="/manifest">
2324
<uses-permission android:name="android.permission.BLUETOOTH"/>
2425
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>

readme.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ I'm available for hire on Bluetooth Low Energy, Ionic and Cordova projects. This
3636
## To Do ##
3737

3838
* Expand Windows support
39-
* Operation queueing on Android (possibly). See Queuing section below.
4039
* Improved notifications on peripheral/server role between Android and iOS
4140
* Code refactoring. It's getting pretty messy.
4241

@@ -45,7 +44,7 @@ I'm available for hire on Bluetooth Low Energy, Ionic and Cordova projects. This
4544

4645
Check out ng-cordova-bluetoothle [here!](https://github.com/randdusing/ng-cordova-bluetoothle)
4746

48-
If timeouts or queueing is needed, please check out the Angular wrapper and its example. I don't plan to implement queuing within the plugin itself anymore.
47+
If timeouts are needed, please check out the Angular wrapper and its example.
4948

5049

5150
## Installation ##
@@ -80,10 +79,7 @@ Discovery works differently between Android and iOS. In Android, a single functi
8079

8180

8281
## Queuing (Android) ##
83-
Android commands must be queued. I recommend using promises like in the AngularJS wrapper to queue from the app level. There are a few issues when trying to queue from the plugin level, so I'm still determining how to implement it:
84-
1. Queuing needs to be done at a "global" level rather than per connection.
85-
2. Timeouts would be needed so that the queue would continue processing if onCharacteristicRead, onCharacteristicWrite, etc are never called.
86-
3. Queue would need to be "cleaned" if a device disconnects.
82+
Read and write queueing has been added to the master branch and will be part of the 4.1.0 release. If you'd like to try it out, install the plugin directly from GitHub using: ```cordova plugin https://github.com/randdusing/cordova-plugin-bluetoothle```
8783

8884

8985
## UUIDs ##

0 commit comments

Comments
 (0)