mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-12-04 20:52:23 +01:00
Two Android reports from the first device test: Sound was only audible with the ringer on. The audio attributes used usage=assistanceSonification, which Android routes to STREAM_SYSTEM — muted in silent/vibrate mode. Now usage=media (STREAM_MUSIC), i.e. it follows the media volume like the trainer app's own audio. Vibration never fired. Flutter's HapticFeedback is View.performHapticFeedback, which obeys the system "touch feedback" setting (off by default on many devices) and is a no-op unless our window is focused — mid-ride BikeControl sits behind the trainer app or its overlay. Android now goes through a small method channel (ShiftHapticsChannel.kt) into the Vibrator service with predefined effects (heavy click / click / double click, with pre-Q fallbacks); VIBRATE permission added. The foreground service keeps the process eligible under Android 12+'s background-vibration rule. iOS keeps the impact generators. PlatformShiftHaptics now keys off defaultTargetPlatform so the routing is unit-tested per platform, and the HomeExtras test covers both the desktop and phone toggle layouts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>