Alert.startBuzzer() does not work

by BlackBerry Development Advisor on ‎02-16-2010 10:19 AM (1,938 Views)

Summary


This article applies to the following:

  • BlackBerry Wireless Handheld™ based on Java™
  • BlackBerry® 7100 Series and later


Problem


Alert.startBuzzer() and Alert.setBuzzerVolume() are not supported by the BlackBerry 7100 Series device and later devices.


The BlackBerry 7100 Series device and later devices contain a hardware upgrade that changes the way audio is produced.


Resolution


As an alternative to Alert.startBuzzer(), we recommend Alert.startMIDI(). To determine the method to use, the following tests are performed:


if( Alert.isBuzzerSupported() )
{
Alert.startBuzzer(…);
} else if( Alert.isMIDISupported() )
{
Alert.startMIDI(…);
}

 

Note: If you use a polyphonic tone, use the above test to check the availability of Alert.startADPCM(). You can do so via Alert.isADPCMSupported().