I would like to use the vibrating device for alarm.
How can I get toworki in Java?
I would like to use the vibrating device for alarm.
How can I get toworki in Java?
AFAIK, you can use :
public boolean vibrate(int duration)
Requests operation of the device's vibrator. The vibrator is intended to be used to attract the user's attention or as a special effect for games. The return value indicates if the vibrator can be controlled by the application.
This method switches on the vibrator for the requested duration, or switches it off if the requested duration is zero. If this method is called while the vibrator is still activated from a previous call, the request is interpreted as setting a new duration. It is not interpreted as adding additional time to the original request. This method returns immediately; that is, it must not block the caller while the vibrator is running.
Calls to this method are honored only if the Display is in the foreground. This method MUST perform no action and return false if the Display is in the background.
The device MAY limit or override the duration. For devices that do not include a controllable vibrator, calls to this method return false.
Thanks with Regards,
R a j - The K e r n e l
Join Delhi-NCR Nokia Developer's Community,
Hi,
I tried following:
Display display= getDisplay();
display.setCurrent(form);
display.vibrate(500);
I did not succeed in getting the phone vibrating
1. Test by giving the time dueration more minimum 1 seconds or more than that, please note that :
duration - the number of milliseconds the vibrator should be run, or zero if the vibrator should be turned off
2. Could you check that what the call to the method vibrate is returning?
Please note that:
true if the vibrator can be controlled by the application and this display is in the foreground, false otherwise
Thanks with Regards,
R a j - The K e r n e l
Join Delhi-NCR Nokia Developer's Community,