title: Android - Using method from a Service in an Activity?
body: <p>I have the folowing method in a Service in my appplication:</p>
  
  <pre><code>public void switchSpeaker(boolean speakerFlag){
  
          if(speakerFlag){
          audio_service.setSpeakerphoneOn(false);
          }
          else{
          audio_service.setSpeakerphoneOn(true);
          }
  
      }
  </code></pre>
  
  <p>So my question is whats the best and most effective way to be able to use this method in an Activity like follows</p>
  
  <pre><code>final Button speaker_Button = (Button) findViewById(R.id.widget36);
  
              speaker_Button.setOnClickListener(new View.OnClickListener(){
                  public void onClick(View v){
  
                      switchSpeaker(true); //method from Service
  
                  }
  
              });
  </code></pre>
  
  <p>Do I have to do an AIDL or is there a simpler way?</p>