10

I am working on an app that talks to a Bluetooth LE device. I would like some way to avoid developing it twice, for iOS and for Android. Is there a cross-platform app framework that has good support for Bluetooth LE?

I have had a quick look at frameworks like Cordova (PhoneGap), Appcelerator, Xamarin etc (the usual suspects: for example this list) but I can't figure out if they (a) support Bluetooth LE on each platform at all, and (b) if they do, whether it is via native calls (accessed how?) or some kind of wrapper to the native API (what does the wrapper look like?), and (c) if it is a wrapper, how complete it is, and how stable it is.

If you have experience with these, could you summarize the status of Bluetooth LE support in different frameworks?

EDIT A bit of info from digging into various options and from the answers below:

P.S. Besides Bluetooth my needs are pretty minimal: this app will have a lot of UI elements but not of a complicated kind, just a bunch of buttons/checkboxes/sliders on a bunch of different screens (which would be very tedious to maintain on two platforms). I'd also need to make a few calls to a REST API. Speed is not super important, there isn't that much app logic (it is mostly written in C now), and native UI look is not that important. However working on older versions of the platforms is important, ideally back to Android 4.3 and iOS 7.0.

6
  • 2
    There are several plugins with Phonegap about blueooth low energy. And if you need UI elements, I think you will get all of them easily using HTML5/CSS. But building for the both environment isn't that easy that it looks like as you need two proper environment for each OS. Take a look at the documentation and how Phonegap works.docs.phonegap.com/en/4.0.0/… . Last if you want to sell your app one day, note that Xamarin and Appcelerator have license fees and Cordova is free.
    – AshBringer
    Jun 12, 2015 at 21:57
  • 4
    To everyone who is voting to close this, can you please explain why? This is squarely on topic (see: "software tools commonly used by programmers" etc). It is not asking for recommendations based on opinion, but rather asking about facts ("does this work in framework X?"). Thus, I am perplexed about what the problem is.
    – Alex I
    Jun 14, 2015 at 2:31
  • can you share what you ended up with (if you did) ? Thanks
    – Apperside
    Sep 22, 2016 at 20:02
  • @AlexI Which solution did you end up using? I am currently evaluating Cordova/Ionic with BLECentralPlugin. I am finding that working with such a framework is not intuitive to someone coming from a traditional Android Development background... Jan 6, 2017 at 21:48
  • 1
    @IgorGanapolsky I first developed a simple iOS native app, then switched to Cordova with randduisng/BluetoothLE plugin. Works well, haven't seen any plugin-related issues. Cordova 6.1 for iOS 10.x, Android 6.x.
    – Alex I
    Jan 7, 2017 at 10:52

2 Answers 2

8
+50

I have been using Randdusing's Cordova plugin for BluetoothLE and it works well for Android and iOS (Windows phone still under development). Being Cordova it's designed to work with an HTML5/JavaScript app, but the plugins themselves (as all Cordova plugins?) are written in native code . Earlier in my project I tried Evothings which also has BLE plugin but I found some problems, and I don't know if these have been resolved yet. My app sounds pretty similar to yours in terms of the UI requirements, and I can possibly help with integrating the BLE code if you like - but you'll need to rewrite your 'c' into javascript first. BTW you ask for using with older Android but AFAIK BLE is only supported in Android 4.3 or higher.

3
  • I'll definitely check out the Cordova plugin. What did you run into with Evothings? (it looks really neat but I haven't tried it yet).
    – Alex I
    Jun 15, 2015 at 20:33
  • Are you able to connect phone-to-phone with the bluetoothle plugin? Just to send data from say an android phone to a windows phone over Bluetooth.
    – Lfa
    Apr 11, 2017 at 19:41
  • Did you ever find an iOS sample cordova app for Randdusing's? The one I found from M$ seems to only support Android/Windows.
    – socca1157
    Aug 6, 2017 at 3:11
3

I am using Qt framework developing cross-platform apps with BLE support: http://doc.qt.io/qt-5/qtbluetooth-lowenergyscanner-example.html

Currently the supported platforms are Andriod, iOS, OSX, Linux. Windows platform is said to support BLE in the forthcoming version Qt 5.6 (really looking forward to it). The BLE related classes are easy to use and Qt provided two sample projects in examples/documentation. The thing I am not sure about is getting Manufacturer Specific Data during a scan. Right now I am making a connection to the devices to get certain information which wouldn't be needed if I can read the Manufacturer Specific Data. Qt's BLE currently only support central role.

Qt is based on C++, if that matters to you.

1
  • Have you published this app? I am really curious to try it and evaluate its performance and aesthetics... Jan 6, 2017 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.