Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] suppressVolumeIndicator consumes all key press events, not just volume keys #12

Closed
DoctorMcKay opened this issue Jul 20, 2024 · 3 comments · Fixed by #13
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@DoctorMcKay
Copy link

Describe the bug
When suppressVolumeIndicator is set to true when calling watchVolume, all key press events are consumed instead of just volume keys. This means that, among other things, the back button does not function while volume keys are being watched.

To Reproduce
Steps to reproduce the behavior:

  1. Call watchVolume with suppressVolumeIndicator set to true
  2. Press the device's back button

Expected behavior
The back button should either go back in the history stack, or emit the backButton event in the @capacitor/app plugin

Screenshots
N/A

Desktop (please complete the following information):

  • N/A

Smartphone (please complete the following information):

  • Device: Emulated Pixel 4 Pro API 33
  • OS: Android 13
  • Browser: Mozilla/5.0 (Linux; Android 13; sdk_gphone64_x86_64 Build/TE1A.220922.010; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.71 Mobile Safari/537.36
  • Version: "@capacitor/core": "^6.1.1", "@capacitor-community/volume-buttons": "^6.0.0"

Additional context
N/A

@ryaa ryaa self-assigned this Jul 21, 2024
@ryaa ryaa added the bug Something isn't working label Jul 21, 2024
@ryaa ryaa pinned this issue Jul 22, 2024
ryaa added a commit that referenced this issue Jul 22, 2024
…just volume keys #12

Changes:
- implemented the required fix for [Android] suppressVolumeIndicator consumes all key press events, not just volume keys #12 issue
@ryaa
Copy link
Member

ryaa commented Jul 22, 2024

@DoctorMcKay thank you for the issue. I confirm the problem and implemented the required fix (see #13). Can you please test it on your end and let me know your thoughts? Thank you

@DoctorMcKay
Copy link
Author

@DoctorMcKay thank you for the issue. I confirm the problem and implemented the required fix (see #13). Can you please test it on your end and let me know your thoughts? Thank you

👍 Looks good, I tested it and it works. Thanks!

@ryaa ryaa closed this as completed in #13 Jul 23, 2024
ryaa added a commit that referenced this issue Jul 23, 2024
…pressvolumeindicator-consumes-all-key-press-events-not-just-volume-keys

[Android] suppressVolumeIndicator consumes all key press events, not just volume keys #12
@ryaa ryaa removed the in progress label Jul 23, 2024
@ryaa ryaa added this to the v6.0.1 milestone Jul 23, 2024
@ryaa
Copy link
Member

ryaa commented Jul 23, 2024

The new version 6.0.1 with the required change has been released. For more details please see CHANGELOG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants