|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.os.Vibrator
public class Vibrator
Class that operates the vibrator on the device.
If your process exits, any vibration you started with will stop.
| Field Summary | |
|---|---|
(package private) IHardwareService |
mService
|
| Constructor Summary | |
|---|---|
Vibrator()
|
|
| Method Summary | |
|---|---|
void |
cancel()
Turn the vibrator off. |
void |
vibrate(long milliseconds)
Turn the vibrator on. |
void |
vibrate(long[] pattern,
int repeat)
Vibrate with a given pattern. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
IHardwareService mService
| Constructor Detail |
|---|
public Vibrator()
| Method Detail |
|---|
public void vibrate(long milliseconds)
milliseconds - How long to vibrate for.
public void vibrate(long[] pattern,
int repeat)
Pass in an array of ints that are the times at which to turn on or off the vibrator. The first one is how long to wait before turning it on, and then after that it alternates. If you want to repeat, pass the index into the pattern at which to start the repeat.
pattern - an array of longs of times to turn the vibrator on or off.repeat - the index into pattern at which to repeat, or -1 if
you don't want to repeat.public void cancel()
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||