title: How can I make the pop up dialog invisible in android?
body: <p>I would like to know how can I make the pop up dialog invisible in android? but still working, only diable.</p>
  
  <pre><code>@Override
  public void onProviderDisabled(String provider) {
      //Toast.makeText(getApplicationContext(),"#####onProviderDisabled", Toast.LENGTH_LONG).show();
      AlertDialog.Builder dialog = new AlertDialog.Builder(MainActivity.this);
      dialog.setMessage("open gps");
      dialog.setPositiveButton("open GPS",
              new DialogInterface.OnClickListener() {
  
                  @Override
                  public void onClick(
                          DialogInterface paramDialogInterface,
                          int paramInt) {
                      Intent myIntent = new Intent(
                              Settings.ACTION_LOCATION_SOURCE_SETTINGS);
                      startActivity(myIntent);
                      // get gps
                  }
              });
      dialog.setNegativeButton(
              "not now",
              new DialogInterface.OnClickListener() {
                  @Override
                  public void onClick(
                          DialogInterface paramDialogInterface,
                          int paramInt) {
  
                  }
              });
      dialog.show();
  }
  </code></pre>
  
  <p>};</p>