How do I programmatically close an alert dailog on event occurrance

90 Views Asked by At

How do I programmatically close an alert dailog if specific event has occurred...for example...alert dailog must close itself when a new message is received... Please help

1

There are 1 best solutions below

1
On

All Dialogs will implement dismiss() and cancel() via the DialogInterface.

I would strongly suggest reading the Official Android Developers guide on Dialogs for more information and best practices.