Android Alert dialog from inside an intent service
问题 I want to display an alert dialog from inside an intent service. AlertDialog alertDialog = new AlertDialog.Builder(this).create(); This throws the following exception Unable to add window — token null is not for an application I have tried IntentService.this and getApplicationContext() as well. Between i dont want to do it using an activity. I just want to show a simple alert dialog with a little text. 回答1: Need Activity for display AlertDialog , because we can't display Dialog from any