java.lang.Object | |
↳ | com.neomades.io.Vibrator |
Class that handles the vibrator on the device.
By default the vibrator vibrates continuously during the fixed period.
To use this class, the VIBRATE permission must be declared in the URS file.
To get a vibrator instance, use the Vibrator.getVibrator()
method.
In iOS, the vibrator vibrates at intervals of 1 second during the fixed period..
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static Vibrator |
getVibrator()
Get the device vibrator class utility.
| ||||||||||
boolean |
hasVibrator()
Return if the device has vibrator.
| ||||||||||
Vibrator |
setDuration(long duration)
Set the vibration duration in milliseconds.
| ||||||||||
void |
startVibration()
Vibrate with the current vibrator settings (duration...).
| ||||||||||
void |
stopVibration()
Turn the vibrator off.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Get the device vibrator class utility.
Return if the device has vibrator.
Set the vibration duration in milliseconds.
duration | in milliseconds |
---|
Vibrate with the current vibrator settings (duration...).
SecurityException | if the VIBRATE permission has not been set into the
URS File
|
---|
Turn the vibrator off.