Android - How do we make notification visible once application is installed?

by paresh mayani » Fri, 18 Mar 2011 14:40:30 GMT


Sponsored Links
 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.

-- 



Android - How do we make notification visible once application is installed?

by paresh mayani » Fri, 18 Mar 2011 14:43:50 GMT


 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.

-- 


Sponsored Links


Re: Android - How do we make notification visible once application is installed?

by TreKing » Sat, 19 Mar 2011 09:52:17 GMT


 



No. The user must run an app once it's installed.

-------------------------------------------------------------------------------------------------
TreKing < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

-- 



Other Threads

1. Will platform versions report be updated again?

Hi,

it says that the platform-versions report gets updated every two weeks.
However it seems the most recent update was six weeks ago:

http://developer.android.com/resources/dashboard/platform-versions.html

Is that just bad luck or am looking in the wrong place?

Cheers,
Mariano

-- 

2. how to get android phone to read out words

it's not as complex as speech recognition, but i just want to somehow
make my android app read out pre-written lines.  is there a way to do
that?

thanks.

-- 

3. Call order of multiple registered callbacks

4. Webview segfault causes process to restart and in rare cases take the Android platform down and turn the phone off

5. Error generating final archive: invalid entry size

6. ADB connect 192.168.16.2:5555 link drops

7. Is it legal to use an invalid Map API key?