fm/fmapp2/src/com/caf/fmradio/FMRadioService.java
public boolean routeAudio(int audioDevice) {
      boolean bStatus=false;
      AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);

      //Log.d(LOGTAG, "routeAudio: " + audioDevice);

      switch (audioDevice) {

        case RADIO_AUDIO_DEVICE_WIRED_HEADSET:
            mAudioDevice = "headset";
            break;

        case RADIO_AUDIO_DEVICE_SPEAKER:
            mAudioDevice = "speaker";
            break;

        default:
            mAudioDevice = "headset";
            break;
      }

      if (mReceiver != null)
      {
      //audioManager.setParameters("FMRadioOn=false");
      //Log.d(LOGTAG, "mAudioManager.setFmRadioOn =" + mAudioDevice );
      //audioManager.setParameters("FMRadioOn="+mAudioDevice);
      //Log.d(LOGTAG, "mAudioManager.setFmRadioOn done \n");
       }

       return bStatus;
   }
/*
   *  Route Audio to headset or speaker phone
   *  @return true if routeAudio call succeeded, false if the route call failed.
   */
Route Audio to headset or speaker phone
@return true if routeAudio call succeeded, false if the route call failed.
Route Audio to headset or speaker phone @return true if routeAudio call succeeded false if the route call failed .
public boolean routeAudio(int audioDevice) {
      boolean bStatus=false;
      AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
      switch (audioDevice) {
        case RADIO_AUDIO_DEVICE_WIRED_HEADSET:
            mAudioDevice = "headset";
            break;
        case RADIO_AUDIO_DEVICE_SPEAKER:
            mAudioDevice = "speaker";
            break;
        default:
            mAudioDevice = "headset";
            break;
      }
      if (mReceiver != null)
      {
       }
       return bStatus;
   }
public boolean routeAudio ( int audioDevice ) { boolean bStatus = false ; AudioManager audioManager = ( AudioManager ) getSystemService ( Context . AUDIO_SERVICE ) ; switch ( audioDevice ) { case RADIO_AUDIO_DEVICE_WIRED_HEADSET : mAudioDevice = "headset" ; break ; case RADIO_AUDIO_DEVICE_SPEAKER : mAudioDevice = "speaker" ; break ; default : mAudioDevice = "headset" ; break ; } if ( mReceiver != null ) { } return bStatus ; }
Route Audio to headset or speaker phone
  @return true if routeAudio call succeeded, false if the route call failed.
Route Audio to headset or speaker phone @return true if routeAudio call succeeded false if the route call failed .
//Log.d(LOGTAG, "routeAudio: " + audioDevice); //audioManager.setParameters("FMRadioOn=false"); //Log.d(LOGTAG, "mAudioManager.setFmRadioOn =" + mAudioDevice ); //audioManager.setParameters("FMRadioOn="+mAudioDevice); //Log.d(LOGTAG, "mAudioManager.setFmRadioOn done \n");