diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-08AA357E-7499-4A8E-B756-4FCDFBEDB9FC.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-08AA357E-7499-4A8E-B756-4FCDFBEDB9FC.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,45 @@ + + +startvibra()

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:

+
    +
  • duration:

    + +

    Duration of the vibration measured in milliseconds. The value 0 specifies that the vibration should continue indefinitely or till the hardware-imposed limit, and should be stopped with a call to the stopvibra method.

    +

    duration argument can have the maximum value of vibramaxduration

    + +
  • +
+

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.

+
+
    +
  • intensity:

    + +

    Intensity of the vibra is in the range of -100 to 100, which shows the percentage of the vibra motor's full rotation speed. When intensity is negative, the vibra motor rotates in the negative direction. When intensity is positive, the vibra motor rotates in the positive direction.

    + +
  • +
+

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);
+}
+
\ No newline at end of file