Handling Status Bar notification
<p>in my app a background service starts and from that service i want to  set Status bar notification, that the service has Started  following is the code :</p>

<pre><code>    Context context = getApplicationContext();
    String ns = Context.NOTIFICATION_SERVICE;
    int icon = R.drawable.icon;
    CharSequence tickerText = "Hello";
    long when = System.currentTimeMillis();
    Notification notification = new Notification(icon, tickerText, when);
    CharSequence contentTitle = "My notification";
    CharSequence contentText = "Hello World!";
    Intent notificationIntent = new Intent(MyService.this, MyClass.class);
    notificationIntent.setFlags(  Intent.FLAG_ACTIVITY_NEW_TASK);

    PendingIntent contentIntent = PendingIntent.getActivity(this,0,notificationIntent,0);

    notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);
   NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns);
   mNotificationManager.notify(1, notification);
</code></pre>

<p>Notification is displayed in Status bar But whin i click on that MyClass.class is not fired.And in log cat it shows
"Input Manager Service   Window already focused ignoring focuson ...."</p>

<p>so plz provide solution.</p>

<p>thanks in advance</p>
