startvibra()

Syntax:

[void] sysinfo.startvibra(Int duration, Int intensity)

Description:

The startvibra method turns the device vibration on for the specified duration with the specified intensity (frequency).

Argument:

Note: A device may have implementation-defined or hardware-imposed limits to the duration of the vibration feature. In such circumstances, any vibration will stop at that limit even if the duration parameter is greater than the limit or specified as infinity.

Note: The device might have hardware-imposed limits on the supported vibra intensity values, so the actual effect might vary between different hardware.

Return value:

This method does not return a value.

Remarks:

If the vibration setting in the device's active profile is set to "off", startvibra() will not cause the vibration feature to vibrate. Use the vibrasettings property to detect whether vibration is allowed.

Example code:

function startVibration()
{
   // get the system defined maximum duration
   var duration = sysinfo.vibramaxduration;
   // get the system defined minimum intensity
   var intensity = sysinfo.vibraminintensity
   // start vibration
   sysinfo.startvibra(duration, intensity);
}