title: Android: How to pass Intent via startActivity() to a running Activity?
body: <p>Say <code>MyService</code> and <code>MyClient</code> are both running, although <code>MyClient</code> is currently in the background. If <code>MyService</code> sends an Intent to <code>MyClient</code> via:</p>
  
  <pre><code>Intent i = new Intent(MYService.this, MyClient.class);
  i.setAction("com.test.MyService.ACTION_SERVICE");
  i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
  startActivity(i);
  </code></pre>
  
  <p>How do I get this Intent in MyClient? Running this code triggers onResume() in <code>MyClient</code>, but because it's already running, calling <code>getIntent()</code> returns the Intent that initially created MyClient, which is always <code>android.intent.action.MAIN</code></p>