• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Disable touch input events?

Using a Moto D1 for development... touchscreen is flaky on this unit and causing false inputs. I'd like to be able to disable it using the adb shell or a script.

I believe the touch event is /dev/input/event2 on the D1... anyway, anyone know how to "break" this input event or otherwise disable the touchscreen temporarily?

TIA
 
No idea about how to do it at the driver/kernel/os level like that but you could always have your views capture the event and tell the OS to ignore it.

View.onTouchEvent returns a boolean whether or not to continue processing the event. if you return false (IIRC) it will stop processing the event. Might be the other way around though should be in the docs.

not a perfect or easy solution, but hope it helps.
 
Back
Top Bottom