Author Topic: RFduino support for mobile (iOS/Android/Cordova/React Native)  (Read 509 times)

adronitis

  • RFduino Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
What I'm Trying to Do:

I'm looking to develop a mobile application for both iOS and Android that works with a RFduino device. Currently, I'm deciding on the technology (React Native would be preferable), but I recognize that how well RFduino is supported is paramount.

Question:

What mobile platforms are supported by RFduino? Or are they all done by 3rd party developers? And specifically, is there React Native support, 3rd party or otherwise?

My Current Understanding of it:

  • Cordova has https://github.com/don/cordova-plugin-rfduino which is maintained by a 3rd party. I'm leaning away from Cordova though due to how laggy the user interface was.
  • React Native (my preference) appears to have no support for it. There are two BLE libraries I stumbled across (one being a port of a Cordova plugin), but none specific to RFduino.
  • iOS has a bunch of sample projects in ObjC! Swift appears to be a community WIP via http://forum.rfduino.com/index.php?topic=727.0
  • Android is...sorta supported? There's no official sample code and a lot of unanswered questions.

Thanks for the help! It's very much appreciated. :)

squatsandscience

  • RFduino Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: RFduino support for mobile (iOS/Android/Cordova/React Native)
« Reply #1 on: July 20, 2016, 10:33:28 PM »
Curious as well.

wookie1

  • RFduino Jr. Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: RFduino support for mobile (iOS/Android/Cordova/React Native)
« Reply #2 on: July 21, 2016, 10:14:19 AM »
You might look at Codename One. They ported Cordova's BLE library, which is probably slow because it runs on the device's browser as I understand. Codename One takes code you write in Java, and then builds native Android and iOS application files. It's statically compiled, so it doesn't break when the browser is updated and probably runs faster also.

In general, BLE on Android has some challenges. There are a number of workarounds needed and you have to write some code to handle checking the Android API level and then calling different methods for scanning the device depending on the API level. Also, I think starting with level 23, you need to gain some permission from the user at runtime, not ahead of time like it used to be. On devices not running API level 23, you can't do that or it will crash (I've heard, I haven't gotten this far yet and still target API 21).

Good luck whichever way you choose!

 

anything