com.samsung.util
Class Vibration

java.lang.Object
  |
  +--com.samsung.util.Vibration

public final class Vibration
extends java.lang.Object

The Vibration class controls vibration of phone.


Method Summary
static boolean isSupported()
          Gets an information whether vibration is supported by the device.
static void start(int duration, int strength)
          Starts vibrating with duration(sec) and strength.
static void stop()
          Stops vibrating.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isSupported

public static boolean isSupported()
Gets an information whether vibration is supported by the device.

Returns:
true if the vibration is supported.

start

public static void start(int duration,
                         int strength)
Starts vibrating with duration(sec) and strength.

Parameters:
duration - is the duration of vibrating in seconds. Duration must be positive.
strength - is between 1 and 5. Strength will be applied only to specific devices. Currently this is ignored.
Throws:
java.lang.IllegalStateException - Thrown if the device does not support Vibration
java.lang.IllegalArgumentException - Thrown if duration or strength is in invalid range.

stop

public static void stop()
Stops vibrating.

Throws:
java.lang.IllegalStateException - Thrown if the device does not support Vibration