Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28280] Android: Auditive feedback on all views although not clickable

GitHub Issuen/a
TypeBug
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 9.3.0, Release 9.2.2
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterHans Knöchel
AssigneeUnknown
Created2020-12-10T08:45:52.000+0000
Updated2020-12-11T15:11:08.000+0000

Description

There is an odd behavior that we just noticed with our new test devices (e.g. Pixel 5, running Android 11): When tapping anywhere in a view, even a classic empty Ti.UI.View, there is an auditive feedback (a "tap sound") as well as a haptic feedback (a slight vibration) happening. Simple view to reproduce:
const window = Ti.UI.createWindow();
window.add(Ti.UI.createView({ backgroundColor: 'red', width: 300, height: 300 });
window.open();
We were curious and compared it with other apps as well as Android system apps and it doesn't happen there. Therefore the question, if there might be an issue with some kind of default value regarding the touchEnabled / touchFeedback that should be changed. Please also feel free to immediately mark this as Invalid or an improvement if it's not actually a bug. Thank you for looking into this! *EDIT*: There seem to be an undocumented soundEffectsEnabled boolean property on the Ti.UI.View, but disabling it does not seem to help.

Comments

  1. Joshua Quick 2020-12-10

    It's likely happening because touch is enabled on all Titanium views by default because that's what we document. Note that Android's native view do not have this enabled by default. Although, I've never heard or seen any touch feedback before on my devices before. I wonder if this happens if you have an "accessibility" feature turned on.
  2. Joshua Quick 2020-12-10

    Under Android's Settings -> Sound -> Advanced section I can see checkboxes for "Touch Sounds" and "Touch Vibration". They're enabled on my Pixel 3 device but it doesn't cause sounds/vibration when I touch Ti.UI.Views with touch enabled. I'm curious if your custom theme is setting the android:soundEffectsEnabled to true on all views? Hmm... I'm really curious why you're seeing this. Does it only happen on your Pixel 5?
  3. Hans Knöchel 2020-12-11

    We do not use android:soundEffectsEnabled. Is there a reason to use a different "touch enabled" behavior compared to natively? Won't "click" event listeners work without it? Regarding the device: It also happens with other devices (for example if tapping between the login form and social buttons in the login view of our app. Maybe an Android 11 thing?

JSON Source