Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Highlighted
Developer
Posts: 204
Registered: ‎07-09-2009
My Device: Not Specified

Play tone through speaker while call active -- works in sim, not on phone

I'm doing Manager.playTone(80, 250, 100), which works when a call is not active, and works on the simulator when a call is active, but does absolutely nothing when a call is active.  

 

I though it might be the audio path, but it's not even coming through the earpiece, and I can't figure out how to do a setAudioPath() for playTone.

 

Does anyone know how to solve this?  I want to play a tone through the speaker (not earpiece) whether in-call or not.

 

I could create a Player and do a setAudioPath for that, if I knew how to create a player that will just play a tone.  Reading the API's, I see that it can play a tone sequence, but don't understand how to create a tone sequence.  It all looks very overcomplicated, InputStreams and DataSources and whatnot.  

 

Any help would be appreciated!  Thanks,

 

Developer
Posts: 204
Registered: ‎07-09-2009
My Device: Not Specified

Re: Play tone through speaker while call active -- works in sim, not on phone

To clarify what I means, it works on the real phone when no call is active, and on the sim whether a call is active or not, but does not do anything on the real phone when a call is active.  It's an 8330 and 4.5, building with 4.2.1 JDE.

 

Developer
Posts: 1,636
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: Play tone through speaker while call active -- works in sim, not on phone

I think this is by design in the BB OS.  you can not play any sounds when there is a call.

I'm pretty sure RIM disabled this feature.

Developer
Posts: 204
Registered: ‎07-09-2009
My Device: Not Specified

Re: Play tone through speaker while call active -- works in sim, not on phone

Before I give up, can a development advisor comment on this? 

 

I was thinking if could just find a way to apply setAudioPath to playTone, it could come out the speaker.  Right now it isn't going anywhere, even the earpiece, and I've heard there's an app that can at least do THAT, but I can't even get that far.

 

Tried Alert.startBuzzer and that didn't do anything on the real phone in or out of call, but again worked on the sim.

 

BlackBerry Development Advisor
Posts: 15,803
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Play tone through speaker while call active -- works in sim, not on phone

[ Edited ]

You can consider this to not be supported.  Most BlackBerry smartphones can only play audio from one source/codec at a time.  There are a couple that can, however for the most part this is not supported.

 

You can see different results for this on your PC because the BlackBerry smartphone simulator is using your computer for all multimedia content, which differs from the hardware within a real BlackBerry smartphone.

Message Edited by MSohm on 09-23-2009 09:28 AM
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.