You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Yes, that should all be fine - Gadgetbridge handles that great with Bangle.js for example.

    What you may be hitting is actually your phone's power saving. It can be super aggressive and is the biggest cause of issues with Gadgetbridge. So much so that someone made a nice website with instructions for how to try and make it work on specific phone types: https://dontkillmyapp.com/

    Having said that, sometimes you may well get a disconnect - maybe someone has a badly sealed microwave oven on and it basically makes the 2.4ghz radio band unusable while it's on, or they leave the Puck behind and it goes out of range for a bit. So your app will have to handle the disconnect event and reconnect.

    One way to maybe help with that without having to fiddle with your app is to make your Puck a HID device (eg a keyboard) using something like https://www.espruino.com/BLE+Keyboard - it could then send out a fake keypress which maybe your app would be able to handle.

    By making the Puck look like a keyboard, Android will then 'take ownership' of it, so it should then automatically reconnect whenever it sees the device.

About

Avatar for Gordon @Gordon started