Skip to content Skip to sidebar Skip to footer

Motionevent.obtain(...); Not Working As On Screen Tapper

This is a continuation of my first topic here, about how to use code to mimic an on screen touch. I wanted to incorporate this function to a floating, onscreen, chat-head (like wha

Solution 1:

I beleive you need to run touch events on the UI thread for them to work, try this out

view.post(new Runnable() {
   @Override
   public void run() {
      onTouchEvent(event);
   }
});

Post a Comment for "Motionevent.obtain(...); Not Working As On Screen Tapper"