Hi,

As per my this question, i have written the below code to show
notification and also made a notification steady at the notification
bar.

private void showNotification()
{
        CharSequence title = "Hello";
        CharSequence message = "Notification Demo";

        NotificationManager notificationManager =
(NotificationManager)getSystemService(NOTIFICATION_SERVICE);
        Notification notification = new Notification(R.drawable.icon,
"A Notification", System.currentTimeMillis());
        Intent notificationIntent = new Intent(this,
Main_Activity.class);
        PendingIntent pendingIntent = PendingIntent.getActivity(this,
0, notificationIntent, 0);

        notification.setLatestEventInfo(Main_Activity.this, title,
message, pendingIntent);
        notification.flags = Notification.FLAG_NO_CLEAR;
        notificationManager.notify(NOTIFICATION_ID, notification);
}

But, is there any way to make a notification visible once the
application is installed in the phone? I think there should be any
scenario/method/file in which we can write this code and notification
will be visible as soon as the application gets installed in the
phone.

Again i am taking an example of "yahoo mail" application, in the same
application, once we installed the yahoo application, the notification
is appeared with icon at the same time.

Please share your ideas and suggestions.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to