SyntaxFix
Write A Post
Hire A Developer
Questions
A dialog is always created and displayed as a part of an Activity. You need to pass in an Activity context instead of the Application context.
http://developer.android.com/guide/topics/ui/dialogs.html#ShowingADialog