For Vibration alerts in palm devices we can use this function.
void Vibrate()
{
Err err;
UInt32 extVersion;
UInt16 vibrate = kIndicatorAlertAlert;
UInt16 vibrateCount = 2;//indicates how many times it needs to vibrate.
err = FtrGet(hsFtrCreator, hsFtrIDVersion, &extVersion);
if(err == errNone && extVersion >= 0x05000000) // actually could be 0x05210000
{
err = HsIndicatorState(vibrateCount, kIndicatorTypeVibrator,&vibrate);
}
SndPlaySystemSound (sndInfo);//For making one sound indication. Other than sndInfo We can use sndWarning, sndError, sndStartUp, sndAlarm, sndConfirmation, sndClick
SndPlaySystemSound (sndInfo);
}
The documentation for the HsIndicatorState
|
Set or get the state of the LED or Vibrator.
|
|