title: How to create a confirmation dialog for call function
body: <p>I am using eclipse for Android app development and i want to create a dialog box for confirmation when the call function is triggered from a button/s of the application.</p>
  
  <p>For example when i press the button call i want a dialog box Are you sure you want to proceed? with yes and no.</p>
  
  <p>As it is now when i press button for call it's auto dialing directly (no dial pad)</p>
  
  <p>(I am not sure if this code is responsible for this)</p>
  
  <pre><code>public class AlertDialogManager {
  /**
   * Function to display simple Alert Dialog
   * @param context - application context
   * @param title - alert dialog title
   * @param message - alert message
   * @param status - success/failure (used to set icon)
   *               - pass null if you don't want icon
   * */
  public void showAlertDialog(Context context, String title, String message,
          Boolean status) {
      AlertDialog alertDialog = new AlertDialog.Builder(context).create();
  
      alertDialog.setTitle("Title");
      alertDialog.setMessage("Message");
      alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dialog, int which) {
          }
      });
  
      // Showing Alert Message
      alertDialog.setIcon(R.drawable.icon);
      alertDialog.show();
  }
  </code></pre>
  
  <p>}    </p>