Skip to content

Add haptic feedback#106

Merged
danielchalmers merged 4 commits into
mainfrom
claude/haptics
Jul 17, 2026
Merged

Add haptic feedback#106
danielchalmers merged 4 commits into
mainfrom
claude/haptics

Conversation

@danielchalmers

@danielchalmers danielchalmers commented Jul 17, 2026

Copy link
Copy Markdown
Owner

A small haptics service (Data/HapticFeedbackService.cs) that plays predefined Android HapticFeedbackConstants on discrete, meaningful interactions. Singleton, shared with the tests, no-op off Android.

Where it fires:

  • Ticks on the mood, rating, and low/high and mild/severe pickers, and the sleep steppers. The sleep slider uses the softer frequent tick since dragging crosses a lot of steps at once.
  • Toggle on/off on the yes/no, medication, and settings switches.
  • Confirm on submitting a note, category, or dose, and on deleting a category; reject when a category fails validation.

Nothing on scrolling, typing (the keyboard handles its own), or plain navigation.

It goes through View.PerformHapticFeedback, so no VIBRATE permission and it honors the system touch-feedback setting. The API 30/34 constants fall back to older ones down to our min SDK of 27. Controls hook ValueChanged instead of @bind-Value:after to keep logic out of setters.

@danielchalmers danielchalmers changed the title Add haptic feedback for key interactions Add haptic feedback Jul 17, 2026
Add a soft frequent tick to the sleep slider so dragging it matches the
+/- steppers, using SEGMENT_FREQUENT_TICK which is tuned to stay soft
across many steps in quick succession. Confirm on the dose dialog submit
for parity with the note and category dialogs. Drop the buzz when the
mood picker opens, since opening a popover is not a predefined haptic
action and no other button in the app cues on open.
No long-press gesture occurs, so the predefined Confirm constant that
signals a completed action is the accurate fit. Drops the now-unused
LongPress helper.
@danielchalmers
danielchalmers merged commit 5b2bacc into main Jul 17, 2026
1 check passed
@danielchalmers
danielchalmers deleted the claude/haptics branch July 17, 2026 19:02
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