title: Android inject touch event
body: <p>I know this is a bit repeating question. I have reviewed various questions on SO and few other sites but could not find a single answer that satisfies my need.</p>
  
  <p><strong>Requirement</strong></p>
  
  <p>1) I have X,Y coordinates, I want to <strong>create MotionEvent and dispatch it to topmost activity/view.</strong></p>
  
  <p>2) I have to inject it in my own App. So <strong>Inject_Events permission should not be required</strong>.</p>
  
  <p>3) While I have the coordinates, <strong>I do not know, Activity or View which are at that position. So Activity.dispatchTouchEvent does not work for me.</strong>. (view.dispatchTouchEvent will work but I do not know the view).</p>
  
  <p>4) <strong>Instrumentation does not help either</strong> because they do not have single method to inject touch event at x,y location.</p>
  
  <p>5) InputManager has hidden method injectInputEvent but I don't know <strong>how to access injectInputEvent  and compile it?</strong></p>
  
  <p>Any help appreciated!</p>