title: How to inject input events into own application on Android?
body: <p>I look for a way how to inject input events such as touch or keyboard events into the own application, from code within that particular app. <em>NOT</em> into an Android OS or to other apps b/c that needs a signature-level permission android.permission.INJECT_EVENTS or rooted device and I have to avoid both. I look for a code that runs on a non-rooted device without anyhow elevated rights.</p>
  
  <p>I'm somehow making a bit of progress with code based on the following concept:</p>
  
  <pre><code>View v = findViewById(android.R.id.content).getRootView();
  v.dispatchTouchEvent(e);
  </code></pre>