09-17-2009 11:29 PM
I'm using Alert.startBuzzer() to make a beep. It works in the simulator but nothing happens on the phone, not even out of the earpiece.
The phone's master volume is all the way up, I tried using Alert.startBuzzer(... , Audio.getVolume()) and also Alert.startBuzzer(... , 50), both work on the sim but not the real phone.
Couldn't figure out how to use AudioPathControl with Alert.startBuzzer.
Thought this would be simple, surely it must be, what am I missing? Thanks,
09-17-2009 11:34 PM
Forget about Alert - this is for old-old-old phones with monotonic sound devices.
Use Player and Manager.
09-18-2009 12:00 AM
Do I have to use a player to make a simple beep? This does work in the simulator.
But if that's the only way, then before I waste more time figuring it out, does anyone who's done it feel like sharing the code to make a beep out of the phone speaker... that actually works on a real phone in use these days? Thanks,
09-18-2009 04:00 AM
Try using this instead of startBuzzer.
What JDE are you using for development and what device are you using?
public static final boolean playTune(short [] tune, int volume) {
if ( Alert.isAudioSupported() ) {
Alert.startAudio(tune, volume);
return true;
}
if ( Alert.isBuzzerSupported() ) {
Alert.startBuzzer(tune, volume );
return true;
}
return false;
}
09-18-2009 04:55 AM
4.2.1 API on 8330. When the Alert.startBuzzer() is called the firewall gives the "trying to access multimedia..." prompt, but after that was Allowed, no sounds. So the API must be there, the firewall catches it. Looked for a setting in the profile that might be canceling the alert, couldn't find anything likely, but I'm no BB expert even as a user.
Ended up using Manager.playTone which is more annoying because you can't specify the frequency and have to convert to a MIDI note, and on the Storm it plays a piano note instead of a beep, but at least that's something.
09-18-2009 07:36 AM
04-09-2010 09:13 PM
Would you mind sharing the Alert.StartBuzzer() code?
Thanks in advance.