BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 10-19-2009, 06:39 AM   #1 (permalink)
New Member
 
Join Date: Jun 2009
Model: 9000
PIN: N/A
Carrier: Maxis
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to play sound through the speaker?

Please Login to Remove!

I want to play sound loud through the speaker on the phone - just like when the phone is in speaker phone mode. I try the following code, but can not get it to work :

player = Manager.createPlayer(Manager.TONE_DEVICE_LOCATOR);
player.realize();
ToneControl tc = (ToneControl) player.getControl("ToneControl");
tc.setSequence(aSeq);
VolumeControl vc = (VolumeControl) player.getControl("VolumeControl");
vc.setLevel(100);
AudioPathControl apc = (AudioPathControl) player.getControl("AudioPathControl");
//apc is now null and of course, the below throws an exception
apc.setAudioPath(AudioPathControl.AUDIO_PATH_HANDS FREE);
player.start();

Why can I not get the AudioPathControl object? Does anyone know how to do this?

Last edited by pmagnus2 : 10-19-2009 at 06:40 AM.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

T148960 HP 8080A Mainframe w/ 8091A Rate Gen, 8092A Delay Gen, 2X 8093A Amp 1GHz
$100.0
T148960 HP 8080A Mainframe w/ 8091A Rate Gen, 8092A Delay Gen, 2X 8093A Amp 1GHz pictureT148961 HP 8080A Mainframe w/ 8091A Rate Gen, 8092A Delay Gen, 2X 8093A Amp 1GHz
$200.0
T148961 HP 8080A Mainframe w/ 8091A Rate Gen, 8092A Delay Gen, 2X 8093A Amp 1GHz picture0100-40013 PCB, MAIN FRAME INTERLOCK, USE
$250.0
0100-40013 PCB, MAIN FRAME INTERLOCK, USE picture0100-35053 PCB ASSY, MAINFRAME INTERLOCKS
$400.0
0100-35053 PCB ASSY, MAINFRAME INTERLOCKS picture0140-35104 USED, HARNESS ASSY, MAINFRAME
$500.0
0140-35104 USED, HARNESS ASSY, MAINFRAME picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.