Android Question How to handle System Events?

Discussion in 'Android Questions' started by kabron, Apr 28, 2015.

  1. kabron

    kabron Member Licensed User

    Is it possible to intercept system events like touch/multitouch action.

    If I understand correctly, any action (toch, button click, orientation, etc) firstly occured at system level and then, depending on current situation(active application) considering as a system call or passed to active activity or become available for running services.

    My goal is to detect in my service definite multitouch action, regardless of current activity. I.e. with any active application(browser, game, etc).

    For example, long touch on the launcher screen invokes wallpaper setup dialog. I need to react before this dialog happened.

    What I need it for, is to use this multitouch event to put/wake the device in/from sleep mode.

    Some devices(e.g. Chuwi V89) has very limited sensor set and programs like Smart Lock are unusable.

    But if we made some conductive pattern on the cover, it will acts as multitouch in the predefined regions and so can be used for lock/unlock function.

    Intuitevely I feel that it's not a simple task and may be it can not be realized with B4A. May be it is possible with tools like a Tasker.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    It is not possible to listen to system touches unless the system sends the touch events to your app.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice