Replies: 1 comment
|
Well, there's already On Apple devices (like your app) you can just check if ANCS is active (with https://www.espruino.com/Reference#l_NRF_ancsIsActive) since that's the service that the Bangle will be using if it's connected to an iOS phone. On Gadgetbridge I guess it's less obvious (maybe checking if a |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
As I'm finalizing development of my iOS app BlueWatch, I've been using a global variable
global.phoneConnectedas a state-restored way to allow apps to know whether a phone is connected, or just a bluetooth peripheral. Does gadgetbridge have a similar variable that it updates upon connect? It would be really neat if both the apps for iOS and Android were able to use a shared variable so the entire system knows whether a phone is connected. I can see it used in numerous applications, such as the bluetoothclockInfoshowing a phone icon if a phone is connected, or something similar. (I've modified the clock_info lib on my watch to do this, would be nice if others were able to see that as well.)If it doesn't utilize a variable like that, would it make sense to add that to the android integration app? In my mind, it would allow for much more interesting developing use cases, like apps doing different things if phones vs computers are connected, etc.
Upon connect, the BlueWatch app also emits a
Bangle.phoneConnectedevent. Does android also do this similarly?All reactions