title: Adding an AlertDialog - Undefined constructor
body: <p>For 10 hours I've being trying to add an alertdialog to my app but not sucessfull, I think that's gonna be a stupid question but I'm realy new on this, tried to research in many links like those <a href="https://stackoverflow.com/questions/11029156/alertdialog-not-working">AlertDialog - Not Working</a> ; <a href="http://developer.android.com/reference/android/app/AlertDialog.Builder.html" rel="nofollow noreferrer">SDK Android AlertDialog.Builder</a>, but even that I still have problems.</p>
  
  <p>Actually, I got every time basicly the same problem:</p>
  
  <p>Here the code I copied from the link to help me:</p>
  
  <pre><code>public void dbFail(){
          AlertDialog alertDialog = new AlertDialog.Builder(this).create();
          alertDialog.setTitle("Reset...");
          alertDialog.setMessage("Are you sure?");
          alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
             public void onClick(DialogInterface dialog, int which) {
                // here you can add functions
             }
          });
          alertDialog.show(); 
      }
  </code></pre>
  
  <p>and Here the problem:</p>
  
  <p>The constructor AlertDialog.Builder(ConnectDB¹) is undefined.</p>
  
  <p>¹- It's the name of my context</p>
  
  <p>So, what do I realy need to do? I didnt see anyone talking about implement this constructor...Do I need to implement a method inside the AlertDialog.Builder calling, describing what is he supposed to do?</p>
  
  <hr>