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. error compiling source under Ubuntu

development/emulator/qtools/trace_reader.cpp:736: warning: deprecated
conversion from string constant to har*development/emulator/qtools/trace_reader.cpp:741: warning: deprecated
conversion from string constant to har*development/emulator/qtools/trace_reader.cpp: In function har*
ExtractDexPathFromMmap(const char*)
development/emulator/qtools/trace_reader.cpp:1012: error: invalid
conversion from onst char*to har*development/emulator/qtools/trace_reader.cpp:1013: error: conflicting
declaration onst char* enddevelopment/emulator/qtools/trace_reader.cpp:1012: error: ndhas a
previous declaration as har* enddevelopment/emulator/qtools/trace_reader.cpp:1016: error: invalid
conversion from onst char*to har*development/emulator/qtools/trace_reader.cpp: In member function oid
TraceReaderBase::Open(char*)
development/emulator/qtools/trace_reader.cpp:736: warning: deprecated
conversion from string constant to har*development/emulator/qtools/trace_reader.cpp:741: warning: deprecated
conversion from string constant to har*development/emulator/qtools/trace_reader.cpp: In member function oid
TraceReaderBase::Open(char*)
development/emulator/qtools/trace_reader.cpp:736: warning: deprecated
conversion from string constant to har*development/emulator/qtools/trace_reader.cpp:741: warning: deprecated
conversion from string constant to har*make: *** [out/host/linux-x86/obj/EXECUTABLES/bbprof_intermediates/
trace_reader.o] Error 1
make: *** Waiting for unfinished jobs....
development/emulator/qtools/trace_reader.cpp: In function har*
ExtractDexPathFromMmap(const char*)
development/emulator/qtools/trace_reader.cpp:1012: error: invalid
conversion from onst char*to har*development/emulator/qtools/trace_reader.cpp:1013: error: conflicting
declaration onst char* enddevelopment/emulator/qtools/trace_reader.cpp:1012: error: ndhas a
previous declaration as har* enddevelopment/emulator/qtools/trace_reader.cpp:1016: error: invalid
conversion from onst char*to har*development/emulator/qtools/trace_reader.cpp: In function har*
ExtractDexPathFromMmap(const char*)
development/emulator/qtools/trace_reader.cpp:1012: error: invalid
conversion from onst char*to har*development/emulator/qtools/trace_reader.cpp:1013: error: conflicting
declaration onst char* enddevelopment/emulator/qtools/trace_reader.cpp:1012: error: ndhas a
previous declaration as har* enddevelopment/emulator/qtools/trace_reader.cpp:1016: error: invalid
conversion from onst char*to har*make: *** [out/host/linux-x86/obj/EXECUTABLES/bb_dump_intermediates/
trace_reader.o] Error 1
make: *** [out/host/linux-x86/obj/EXECUTABLES/bb2sym_intermediates/
trace_reader.o] Error 1


these are the errors i get

any ideas?

-- 

2. Help with Getting Data from web server

Hi,

I am relatively new to android and i would like to know if it is
possible of getting data using http post and get to and from the web
server.
And also if i do not have access to the parameters to the web server,
how would i go about getting it.

Thank you.

-- 

3. Android: ListAdapter populating image (icon) source

4. Android to Windows ICS (Internet Connection Sharing) via WiFi

5. Success in Google Calendar but not > 1.5

6. Is Browsing While Calling Impossible? Why?

7. option to disable Trace-Jit for interested application on non-rooted phone