You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Still shows "Connected" while the phone's Bluetooth is off #136
Hi @foureight84, a small display bug, low priority.
What happens:
If I turn the phone's Bluetooth off while the ring is connected, PulseLoop keeps showing "Connected · 53%" on Today and "Connected, Synced 3m ago" in Settings for as long as Bluetooth stays off. I first noticed it on Oct 22 (build 76) and reproduced it today on RC6 (80).
Today's test (RC6):
12:44:48: app open on Today, ring connected.
12:46:44: Bluetooth turned off from adb (cmd bluetooth_manager disable). The system logs the ring as disconnected right away, but PulseLoop logs nothing at all until Bluetooth comes back. Still "Connected" on both screens 90 s later.
12:48:27: Bluetooth back on. 10 s later the watchdog logs OS reports GATT not connected — forcing reconnect, the app shows "Connecting…", then "Connected" again around 12:48:50.
So it recovers on its own, only the status is wrong while Bluetooth is off.
Likely cause: connectionWatchdogTick() returns right away when !bluetoothAdapter.isEnabled (RingBLEClient.kt, line 497), before the CONNECTED check, and no onConnectionStateChange arrives when the adapter goes off. CRPTeardownMonitor already listens for ACTION_STATE_CHANGED / STATE_OFF, but only for CRP rings. Maybe do the same for every ring type, and mark the link disconnected (or show something like "Bluetooth off")?
What changed: PulseLoop now listens for the phone's Bluetooth turning off for every ring type, not just CRP. It marks the ring disconnected right away and shows "Phone Bluetooth is off". The watchdog also catches it if that broadcast ever gets missed. When Bluetooth comes back on it reconnects like before.
If you get a minute, could you rerun your adb test? cmd bluetooth_manager disable, check that Today and Settings flip to disconnected within a second or two, then re-enable and make sure it reconnects by itself. Thanks!
@foureight84, Tested on v2.11.3+85-rc1 this morning, same adb test as before, with the app open on Today:
Bluetooth off:cmd bluetooth_manager disable at 09:30:42. The log shows "Phone Bluetooth turned off; link marked disconnected" at 09:30:42.165, and a screenshot taken a second later already shows "Disconnected" on Today. Settings showed "Disconnected, Synced 1m ago" too.
Bluetooth back on:enable at 09:32:16. PulseLoop started connecting at 09:32:25 and was connected at 09:32:26, then Today was back to "Connected · 61%" with fresh steps, without me touching anything.
So it works as described, thanks!
One small thing: I never saw the "Phone Bluetooth is off" text. Today, Settings and the Wearable screen all just said "Disconnected". If I read the code right, it only shows on the pairing screen. "Disconnected" is clear enough for me, just mentioning it in case you expected it on Today or Settings.
@Albabit thanks for testing so carefully, and you read the code right: the message only reached the pairing screen 👍
v2.11.3+86-rc2 (versionCode 86, PR #144) now shows it everywhere the ring is disconnected because of the phone's Bluetooth:
Today (and the other tabs): the status pill reads "Bluetooth off" instead of "Disconnected".
Settings: the ring card reads "Phone Bluetooth is off".
Wearable: a line under "Last seen" says "Phone Bluetooth is off — turn it on to reconnect".
It also covers opening the app while Bluetooth is already off, which RC1 didn't (it only reacted to Bluetooth being turned off).
If you get a minute, the same adb test would confirm it: cmd bluetooth_manager disable, check those three screens, then enable and make sure they go back to "Connected" by themselves. Thanks!
@foureight84, Tested on v2.11.3+86-rc2 this morning, same adb test, all three screens look right:
Today:cmd bluetooth_manager disable at 08:46:23, the pill read "Bluetooth off" about a second later ("Phone Bluetooth turned off; link marked disconnected" at 08:46:24.955).
Settings: the ring card read "Phone Bluetooth is off".
Wearable: the new line under "Last seen" was there.
App opened with Bluetooth already off: swiping PulseLoop away from recents doesn't actually stop it here (notification access keeps the process alive), so I force-stopped it with adb at 08:49:48. Android restarted the process right away for the notification listener, with Bluetooth still off. When I opened the app at 08:50:21, Today showed "Bluetooth off" from the first frame.
Bluetooth back on:enable at 08:51:12. The pill went to "Disconnected", the first connect attempt at 08:51:21 timed out (status 147), the next one at 08:52:06 worked, and Today was back to "Connected · 50%" at 08:52:10 without me touching anything. So about a minute this time instead of 10 s on RC1, just because the first try timed out. Fine for me, only mentioning it.
@Albabit awesome, thanks for verifying all four cases on RC2 (and catching the cold-start behavior too) — this one looks solid 🙌
Quick FYI: v2.11.3+87-rc3 (versionCode 87, PR #144) replaces RC2. The Bluetooth-off handling for this issue is unchanged; RC3 only adds the overnight scheduled SpO₂ Doze fixes from #142.
Activity
foureight84 commentedon Nov 13, 2026
@Albabit thanks for the super clear repro, the
connectionWatchdogTickpointer was spot on 🙌Test build is up: v2.11.3+85-rc1 (versionCode 85, PR #144).
What changed: PulseLoop now listens for the phone's Bluetooth turning off for every ring type, not just CRP. It marks the ring disconnected right away and shows "Phone Bluetooth is off". The watchdog also catches it if that broadcast ever gets missed. When Bluetooth comes back on it reconnects like before.
If you get a minute, could you rerun your adb test?
cmd bluetooth_manager disable, check that Today and Settings flip to disconnected within a second or two, then re-enable and make sure it reconnects by itself. Thanks!Albabit commentedon Nov 13, 2026
@foureight84, Tested on v2.11.3+85-rc1 this morning, same adb test as before, with the app open on Today:
cmd bluetooth_manager disableat 09:30:42. The log shows "Phone Bluetooth turned off; link marked disconnected" at 09:30:42.165, and a screenshot taken a second later already shows "Disconnected" on Today. Settings showed "Disconnected, Synced 1m ago" too.enableat 09:32:16. PulseLoop started connecting at 09:32:25 and was connected at 09:32:26, then Today was back to "Connected · 61%" with fresh steps, without me touching anything.So it works as described, thanks!
One small thing: I never saw the "Phone Bluetooth is off" text. Today, Settings and the Wearable screen all just said "Disconnected". If I read the code right, it only shows on the pairing screen. "Disconnected" is clear enough for me, just mentioning it in case you expected it on Today or Settings.
fix: show Phone Bluetooth off on Today, Settings and Wearable (#136)
foureight84 commentedon Nov 14, 2026
@Albabit thanks for testing so carefully, and you read the code right: the message only reached the pairing screen 👍
v2.11.3+86-rc2 (versionCode 86, PR #144) now shows it everywhere the ring is disconnected because of the phone's Bluetooth:
It also covers opening the app while Bluetooth is already off, which RC1 didn't (it only reacted to Bluetooth being turned off).
If you get a minute, the same adb test would confirm it:
cmd bluetooth_manager disable, check those three screens, thenenableand make sure they go back to "Connected" by themselves. Thanks!Albabit commentedon Nov 14, 2026
@foureight84, Tested on v2.11.3+86-rc2 this morning, same adb test, all three screens look right:
cmd bluetooth_manager disableat 08:46:23, the pill read "Bluetooth off" about a second later ("Phone Bluetooth turned off; link marked disconnected" at 08:46:24.955).App opened with Bluetooth already off: swiping PulseLoop away from recents doesn't actually stop it here (notification access keeps the process alive), so I force-stopped it with adb at 08:49:48. Android restarted the process right away for the notification listener, with Bluetooth still off. When I opened the app at 08:50:21, Today showed "Bluetooth off" from the first frame.
Bluetooth back on:
enableat 08:51:12. The pill went to "Disconnected", the first connect attempt at 08:51:21 timed out (status 147), the next one at 08:52:06 worked, and Today was back to "Connected · 50%" at 08:52:10 without me touching anything. So about a minute this time instead of 10 s on RC1, just because the first try timed out. Fine for me, only mentioning it.Thanks!
foureight84 commentedon Nov 15, 2026
@Albabit awesome, thanks for verifying all four cases on RC2 (and catching the cold-start behavior too) — this one looks solid 🙌
Quick FYI: v2.11.3+87-rc3 (versionCode 87, PR #144) replaces RC2. The Bluetooth-off handling for this issue is unchanged; RC3 only adds the overnight scheduled SpO₂ Doze fixes from #142.