title: checkIfPhoneIsSilent() method undefined
body: <p>I'm following thru the example app in Android Development for Dummies which is a simple application that toggles the ringer mode from silent to normal. For some reason, when I call the checkIfPhoneIsSilent method, it is underlined in red with the error message "the method checkIfPhoneIsSilent is undefined for type Main" Here is the code so far:</p>
  
  <pre><code>import android.app.Activity;
  
  import android.graphics.drawable.Drawable;
  
  import android.media.AudioManager;
  
  import android.view.View;
  
  import android.view.View.OnClickListener;
  
  import android.os.Bundle;
  
  import android.widget.Button;
  
  import android.widget.ImageView;
  
  public class Main extends Activity {
  
      private AudioManager mAudioManager;
      private boolean mPhoneIsSilent;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          mAudioManager = (AudioManager)getSystemService(AUDIO_SERVICE);
          checkIfPhoneIsSilent();
          setButtonClickListener();
      }
  
  
  
      private void setButtonClickListener() {
          Button toggleButton = (Button)findViewById(R.id.toggleButton);
          toggleButton.setOnClickListener(new OnClickListener() {
  
                  public void onClick(View v) {
                      if (mPhoneIsSilent) {
                          //change back to normal
                          mAudioManager
                              .setRingerMode(AudioManager.RINGER_MODE_NORMAL);
                      }
  
                  }
          });
      }
  }
  </code></pre>