Skip to content

Call buzz: a ringing call always wins, Pulsed option, calls from apps - #12

Merged
sayed0am merged 2 commits into
mainfrom
call-buzz
Oct 28, 2026
Merged

sayed0am merged 2 commits into
mainfrom
call-buzz

Conversation

@sayed0am

Copy link
Copy Markdown
Owner

Makes the strap's call buzz reliable, adds a Pulsed call buzz, and buzzes for calls from apps like WhatsApp.

Why

The call buzz sometimes didn't happen. A notification's motor pattern cuts off the find-device buzz a call uses (seen 2026-10-20), and the old guard only held notifications back once the ringing state had arrived. Android often posts the call's own notification just before that, and on Samsung it comes from the call screen app, not the dialer, so it got through. A strap that was reconnecting when a call rang never buzzed either.

Zepp has no phone-side guard to copy. Its watches get calls and notifications on one module (0x001E) and sort them in firmware, and the strap has no 0x001E.

What's in it

  • One lock for every buzz in StrapManager. From a call's start until its stop, notification and workout buzzes are dropped.
    • The call waits out a motor pattern still playing, then checks the call is still ringing right before sending, as Zepp does.
    • A stop always goes out after a start still being sent, so a quick hang-up and a second call can't leave the strap silent.
  • Call notifications never play a pattern from any app. Other notifications stay quiet for 3 s after one, until the ringing state arrives.
  • A reconnecting strap: a call waits up to 15 s for it, then buzzes.
  • Steady or Pulsed under Incoming calls on Phone alerts. Pulsed is 600 ms on the motor once a second. Picking one plays it for 4 s, and switching takes over from the one playing.
  • Stuck 03 recovery: after pulses cut a 03 off, the strap sometimes ignored the next 03 until a 06 (fw 3.25). A 03 now waits 3 s, then sends 06 and tries once more, instead of holding every buzz for 8 s.
  • Calls from apps: each ringing signal is a ring source: the call state, the ringtone audio mode (Android 12+) and a calling app's incoming call notification (CallStyle incoming, or a call notification with a full-screen intent). The strap buzzes from the first until the last ends. Answering any call ends them all, and the 60 s limit clears them. Needs notification access.
  • Strength probe: on connect the app reads the SOUND settings group, where Zepp keeps vibration strength (key 4), and logs the reply. On fw 3.25.0.3 the strap lists groups 0, 8, 9, 10 and 11 and answers code 3, so it has no strength setting. Pulsed is the way to make calls feel stronger.
  • Logging: call buzz: sending 03 before the send, every call notification with its app and call type, ring sources and audio mode changes.

Testing

  • 905 unit tests pass, including a new CallBuzzTest for the lock. The release build passes.
  • Checked on a Galaxy Z Fold7 (SM-F966B) with the strap on fw 3.25.0.3, on 2026-10-28:
    • a phone call on Steady with a notification posted while ringing: buzz for all 12.7 s, the notification held back
    • a phone call on Pulsed: first pulse 0.22 s after the ring, then one a second for 15 s, stop at hang-up
    • a WhatsApp call on Pulsed: call state, notification (type 1, full screen) and audio mode all fired. First pulse 0.07 s after the ring, stop 0.3 s after the call ended
    • fast switching between Steady and Pulsed with no errors
  • Not yet checked:
    • a notification landing a split second before a ring (hard to trigger on purpose)
    • calling apps that don't go through Android's call system, like Telegram or Teams on some phones
    • a call ringing while the strap is reconnecting

🤖 Generated with Claude Code

sayed0am and others added 2 commits October 28, 2026 20:28
A notification's motor pattern could cut off the call's find-device buzz when
it landed just before the ringing state, most often the call's own
notification (Samsung posts it from its call screen, not the dialer). Every
buzz now goes through one lock in StrapManager, and from a call's start until
its stop other buzzes are dropped. The call waits out a motor pattern still
playing and checks the call is still ringing right before sending.

Call notifications from any app never buzz by themselves and hold other
notifications back for 3 s until the ringing state arrives. A call that rings
while the strap is reconnecting waits up to 15 s for it.

Phone alerts gets a Steady or Pulsed call buzz (600 ms on the motor once a
second); picking one plays it for 4 s. After pulses cut a 03 off, the strap
sometimes ignored the next 03 until a 06 (fw 3.25), so a 03 now waits 3 s,
then sends 06 and tries once more.

On connect, the app reads the SOUND settings group (Zepp's vibration strength,
key 4). On fw 3.25.0.3 the strap lists groups 0, 8, 9, 10 and 11 and answers
code 3, so it has no strength setting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every ringing signal is now a ring source: the call state, the phone's
ringtone audio mode (MODE_RINGTONE, Android 12+), and a calling app's incoming
call notification (CallStyle type incoming, or a call notification with a
full-screen intent). The strap buzzes from the first source on until the last
one ends; answering any call (OFFHOOK, MODE_IN_CALL or IN_COMMUNICATION) ends
them all, and the 60 s limit clears them.

On a Galaxy Z Fold7, a WhatsApp call (2026-10-28) raised all three: call state
1 at once, then the notification (type 1, ongoing, full screen) and audio mode
1. The first pulse went out 0.07 s after the ring and the buzz stopped 0.3 s
after the call ended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sayed0am
sayed0am merged commit 0299286 into main Oct 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant