to support the Bluetooth APIs in a cross-platform manner.
@valentinstoychev - Is this actually going to be released in v1.2 which from what I understand is coming in the next week or so?
No, this is not planned for 1.2. It is still in unplanned state.
You can vote in our voting-ideas-site here: https://nativescript.ideas.aha.io/ideas/NS-I-61.
Our first project will in Native Script will require Bluetooth communication with a micro controller so this would be fantastic for us!!
I would also add that as the IoT (Internet of Things) is exploding now in popularity and platforms like arduino make it so easy... a cross platform Bluetooth module would really add value to Native Script developers, and could mean the difference between choosing one platform or another for a project requiring Bluetooth ....
Any news on a Bluetooth module?
Bluetooth would be a mandatory feature for some upcoming project which I would love to implement in NativeScript. Also I support @codeowl1 concerning the importance of Bluetooth.
@valentinstoychev I'm willing to help regarding the Android part (having some still limited knowledge there), but I have not much of a clue on iOS.
With regard to developing this further, I'm hoping the following PhoneGap/Cordova-based plugin APIs may offer a good starting point for porting a cross-platform Bluetooth API over to NativeScript.
Superficially, the following project looks most promising, given its support of both Bluetooth 4.0/2.1 _and_ Bluetooth Low Engery (BLE)
BluetoothSerial by Don Coleman (499 Github stars), is also an interesting looking project, although, I'm unsure whether its Bluetooth profile coverage is as comprehensive as BCSsphere's.
If only the newer Bluetooth Low Energy (BLE) compatibility we're required, especially considering some Apple-controlled connection restrictions it alleviates on IOS (see Apple's MFI Program FAQ), then the follow project seems most appropriate to work from:
Admittedly, this project is geared towards Bluetooth Low Energy, but it's reasonably comprehensive and may offer API design ideas. Again, with honourable mention for Bluetooth Low Energy on PhoneGap/Cordova:
Finally, as far I'm aware, generally all the above projects are permissively licensed (e.g. commercial friendly) and are, usually, Apache licensed.
I'm hoping someone within the NativeScript community can make good use of these resources.
In the meantime, I built a plugin (the native side being Android only due to my lack of iOS knowledge and hardware).
It is very crude, since it is:
What it currently does/has:
So at least I was able to build a playground app onto it that reads blood pressure data from a BLE device and contains absolutely no native code/objects/constants/whatever.
As I stated above, I'm willing to share and help.
Still, it would require someone with deeper NativeScript experience to define the API and someone with iOS knowledge. Is there anybody (from core team or other) to fill these roles?
@EddyVerbruggen - are you still working on this one?
Yeah. Waiting for a few devices to test with though.
@EddyVerbruggen I can't contribute devices but I can contribute testing with a few devices. If you're interested in assistance, let me know.
@valentinstoychev @bradmartin Also, if a contribution from a "distant user" like me is considered non-valuable, let me know, then I'll just sit and wait until 1.7.0 comes out ;-)
@lhitc Much appreciated, thanks!
@lhitc Each and every contribution counts! :) Thanks for offering your help. I'm sure Eddy will contact you once the bits are available.
@EddyVerbruggen @valentinstoychev Thanks; eagerly awaiting any Bluetooth bits ;-)
The BT module will be shipped to you today or tomorrow,
Sorry for the delay.
Hi @lhitc, if you're still up for it I'd like you to play with the plugin a bit. Can you (and other folks that may be interested) send me an email at eddyverbruggen at gmail dot com so I can send some instructions and not bother the other repo subscribers with it?
Hey all, I just added the capability to write to peripherals to the Bluetooth plugin. And with that I consider the plugin feature complete and only need to test with a few more devices.
It's a matter of days before I publish it on npm, but if you feel like kicking its tires please go ahead and clone the demo app and open issues on the repo if you think anything is misbehaving.
Hey @valentinstoychev this one is ready for review. I just pushed 1.0.0 to npm.
To help testing and verification I created a demo app which shows how to perform (start/stop)scanning and (dis)connecting. It also shows how to interact with characteristics: read, write, and notify are support at this time.
The plugin is now live @ https://plugins.telerik.com/nativescript/plugin/bluetooth. Big thanks to Eddy for this contribution! @EddyVerbruggen
Thanks!! Valentin!! @valentinstoychev