Hi, In the following code, mContext should be taken from Activity class. Would you tell me how to launch interrupt dialog from Service class?
private void showAlert(){ if (mContext != null) { AlertDialog.Builder builder = new AlertDialog.Builder (mContext); builder.setMessage("Interrupt") .setCancelable(false) .setNegativeButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); builder.create(); } } Thanks, Hiro --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---