BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 10-19-2009, 06:39 AM   #1
pmagnus2
New Member
 
Join Date: Jun 2009
Model: 9000
PIN: N/A
Carrier: Maxis
Posts: 1
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



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Onset Computer Analog/Temp/RH/Light Data Logger MX1104 Onset Computer MX1104 picture

Onset Computer Analog/Temp/RH/Light Data Logger MX1104 Onset Computer MX1104

$261.31



Schneider PLC TWIDO TM2AMM6HT ANALOGUE I/O MODULE 20mA 24VDC Missing Terminal picture

Schneider PLC TWIDO TM2AMM6HT ANALOGUE I/O MODULE 20mA 24VDC Missing Terminal

$156.00



GIC PC10BD16001D1 Programmable Logic Controller Module, PLC Module 24VDC Relay picture

GIC PC10BD16001D1 Programmable Logic Controller Module, PLC Module 24VDC Relay

$139.24



FARRAND RUHEL I/D QUAD BOARD 220300-310 RESOLVER TO QUADRATURE ENCODER CONVERTER picture

FARRAND RUHEL I/D QUAD BOARD 220300-310 RESOLVER TO QUADRATURE ENCODER CONVERTER

$388.00



Onset Computer Mx1104 Analog/Temp/Rh/Light Data Logger picture

Onset Computer Mx1104 Analog/Temp/Rh/Light Data Logger

$208.99



MEASUREMENT COMPUTING PCI-DDA08/16 8-channel, 16-bit Analog Output Board 48 D IO picture

MEASUREMENT COMPUTING PCI-DDA08/16 8-channel, 16-bit Analog Output Board 48 D IO

$349.99







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