I have one Android application, when it runs a service, I want to show the notification on the status bar. Then the user could navigate to other application by pressing HO
I'd recommend you do this,
private void showNotification ()
{
Intent toLaunch = new Intent(getApplicationContext(), DummyActivity.class);
// You'd need this line only if you had shown the notification from a Service
toLaunch.setAction("android.intent.action.MAIN");
PendingIntent intentBack = PendingIntent.getActivity(getApplicationContext(), 0,toLaunch, PendingIntent.FLAG_UPDATE_CURRENT);
....
}
The DummyActivity should simply be an activity that always finishes itself in the oncreate event.
In the manifest file, add these lines
I hope this helps ...