Use AlertDialog inside a service

Put your problem here if it does not fit any of the other categories.

Use AlertDialog inside a service

Postby dushshantha » Tue Apr 08, 2008 10:45 am

HI All,

Is it possible to use an AlertDialog as a notification instead of
using a Toast?? My requirement is to display a text notification,
which is not disappear in few moments. User should be able to close it
by pressing the return button. Please shed some light on me.

Thanks in advance
Dushshantha
dushshantha
Freshman
Freshman
 
Posts: 2
Joined: Fri Apr 04, 2008 7:51 am

Top

Postby kiran » Tue Apr 08, 2008 11:08 am

Yes. you can use showAlert() in android.app.ApplicationContext to display an alert message.
:) smile it is the key that fits the lock of everybody's heart
User avatar
kiran
Experienced Developer
Experienced Developer
 
Posts: 78
Joined: Thu Nov 22, 2007 11:36 am
Location: India

Postby dushshantha » Tue Apr 08, 2008 12:04 pm

Hi Kiran,
Thanks for the quick reply.

But my problem is I need to display a text notification from my remote service, which is not disappear in few moments. I think i cannot use showAlert() in this cases (??)
User should be able to close it by pressing the return button.

Dushshantha
dushshantha
Freshman
Freshman
 
Posts: 2
Joined: Fri Apr 04, 2008 7:51 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 26 guests