Display Dialog from notification

by julius » Wed, 03 Mar 2010 02:41:51 GMT

Sponsored Links

I have a situation where I have a broadcast receiver which creates a
notification and the notification, when selected, sends the
application to a new Activity with a yes/no AlertDialog. I have two

1. Is it possible to show an AlertDialog (from the notification)
without sending the user to a new Activity? (This way the user can
click No and resume working in any other application)

2. A ListActivity already exists in this application. If the user
clicks yes the user should be send to this existing Activity.
Currently I'm dong this from a new activity in the application using:
startActivity(new Intent(this,MSPMain.class));
I believe this is making a new instance of the Activity rather than
simply showing the existing Activity. Is there a way to show the
existing Activity without making starting a new one?

I hope this makes sense... :)

Thank you for any help.


Display Dialog from notification

by Mark Murphy » Wed, 03 Mar 2010 02:46:15 GMT


I don't think so. You can always create a dialog-themed activity, so it
looks like a dialog, but isn't.

Look at android:launchMode:

 http://developer.android.com/guide/topics/manifest/activity-element.html #lmode

Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android Training in NYC: 1-2 May 2010:  http://guruloft.com 


Sponsored Links

Display Dialog from notification

by Julius Spencer » Wed, 03 Mar 2010 18:06:37 GMT

 Thanks for the reference Mark. I realised from an Activity I can just finish it 
and it will show the other Activity.


Other Threads

1. [WTA] Rekomen Widget / Apps buat Desire Z

Halooo All,

Maap mengganggu, nubi mu minta tulung :D

Ane baru aja beli HTC Desire Z.
Sesuai judul kalo ada rekomen Widget / Apps buat Desire Z yg bisa
didonlot via PC?
soalnya simcard ane blum optimal buat internetannya..hehehe.

Makasihh banyakk :)


2. Video conference pakai gtab

Mau tanya kl mau video conference pakai gtab caranya gmn yah? Mau pake
camera depan.

Pk skype gambar yg disana gak muncul, gambar kita jg, pk yahoo cameranya gak
bs camera depan.

Terima kasih :)


3. tutup SIM card DHD ternyata pengaruh ke sinyal

4. What麓s the name of this UI Widget?

5. a webcal application?

6. Setting multiple RTC_WAKEUP alarms from a single app

7. crop a bitmap