title: How can I play Alert.startAudio() through the phone speaker?
body: <p>I need to play <code>Alert.startAudio()</code> through the loudspeaker of a Blackberry device instead of the headset.</p>
  
  <p>I know that I can change the Audio path through the <code>AudioPathControl</code> interface, but I don't know how to get an instance of AudioPathControl.</p>
  
  <p>I found a <a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How_To_-_Specify_Audio_Path_Routing.html?nodeid=1326675&amp;vernum=0" rel="nofollow">LINK</a> on how to do it on the Blackberry Knowledge base, but it only tells me how to do it using the Player class, which I don't want to do. Is there any way to get an instance of AudioPathControl of the current Application?</p>
  
  <p>I would prefer to play a tone programmatically instead of including my own sound file. I found the following code snippet for that.</p>
  
  <pre><code>Player p = javax.microedition.media.Manager.createPlayer(javax.microedition.media.Manager.TONE_DEVICE_LOCATOR);
  p.realize();
  ToneControl tc = (ToneControl) p.getControl("ToneControl");
  AudioPathControl apc = (AudioPathControl) p
  .getControl("AudioPathControl");
  apc.setAudioPath(AudioPathControl.AUDIO_PATH_HANDSFREE);
  tc.setSequence(mySequence);
  p.start();
  </code></pre>
  
  <p>But the problem is that <code>apc</code> is <code>null</code> and throws an <code>Exception</code>. Any solution?</p>