android re-launching application as home button
<p>After many hours of searching and reading articles I am not able to call my stopped application the same way as the home button is re-launching it. So I pressed home button and my application is stopped. And my service(from other package) can only start new instance of my application (main launching activity).</p>

<pre><code>Context context = this.getBaseContext();
PackageManager pm = context.getPackageManager();
Intent appStartIntent = pm.getLaunchIntentForPackage("main.application");
appStartIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
context.startActivity(appStartIntent);
</code></pre>

<p>If it is possible I would like to call onResume of my application from my service - I  didn't achieve it.</p>

<p>I try also this in my activity :D ...</p>

<pre><code>@Override
protected void onStop() {  
    super.onStop();
    super.onResume():
}
</code></pre>

<p>The best unworking solution - override home button</p>

<pre><code>public boolean onKeyDown(int keyCode, KeyEvent event)
{       
    if (keyCode == KeyEvent.KEYCODE_BACK
</code></pre>

<p>Thank you very much for effort in advance.</p>
