1. Download our Official Android App: Forums for Android!

Apps Disable touch input events?

Discussion in 'Android Development' started by RagingGrandpa, Jul 20, 2011.

  1. RagingGrandpa

    RagingGrandpa Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Jul 20, 2011

    Jul 20, 2011
    1
    0
    5
    Ann Arbor, MI
    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
     

    Advertisement

  2. alostpacket

    alostpacket Over Macho Grande?
    Rank:
    None
    Points:
    513
    Posts:
    7,972
    Joined:
    Nov 29, 2009

    Nov 29, 2009
    7,972
    3,603
    513
    Android App Developer
    NY
    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.
     

Share This Page

Loading...