Interacting with Bangle from an Android app

Posted on
  • Hi,

    Is there a tutorial / demo app that connects to the Bangle from an Android app to send and receive data, and collect files from the bangle local storage?

    If not, can anyone give any pointers for getting started with the Android app?

    I have written apps that run on the Bangle and written some JS web apps that connect and interact with the device via a browser. I'm a little unsure how best to approach getting data transfer to and from an Android app. Not sure if I should use the same approach connecting using javascript via a WebView or whether theres a native Android way of communicating between app and watch.

    Thanks!

    Michael

  • Hi - there isn't an example from us at the moment. There's an app that pushes data out via Bluetooth advertising (https://github.com/espruino/AndroidBLEAd­vertiser) but that's it.

    However it should be pretty straightforward - you can use the same UART connection you would with Web Bluetooth, and there's an example app from Nordic showing how to do that here: https://github.com/NordicPlayground/Andr­oid-nRF-UART

    To collect files, it depends a little on the size, if they're a StorageFile, and whether they are binary, but you could look at readFile and readStorageFile here for some ideas: https://github.com/espruino/EspruinoAppL­oaderCore/blob/master/js/comms.js

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Interacting with Bangle from an Android app

Posted by Avatar for user120814 @user120814

Actions