Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

How to vibrate phones from Java ME

From Wiki
Jump to: navigation, search

Needs-update.pngThis article needs to be updated: If you found this article useful, please fix the problems below then delete the {{ArticleNeedsUpdate}} template from the article to remove this warning.

Reasons: hamishwillee (talk) (11 Sep 2013)
I recommend the relevant parts of this article be merged into Controlling vibra settings in Java ME - specifically the MDP1.0 information. This article should then be deleted/redirected to the other article.

Article Metadata
MIDP 2.0
MIDP 1.0
Created: wang_shui (19 Mar 2007)
Last edited: hamishwillee (11 Sep 2013)

To vibrate a MIDP2.0 phone in Java ME by using the following method in javax.microedition.lcdui.Display class.


The duration parameter(in this case 500) is the number of milliseconds the vibrator should be run.

Note, that the duration of the vibration can be limited on certain devices. For example on S60 devices the limit is 10 seconds.

For MIDP 1.0 phones having Nokia UI support you may use the following code which is deprecated in MIDP2.0 phones, 1000) freq, long duration) The above code activates vibration for a given length of time and frequency

To stop vibration the following code is to be executed
This page was last modified on 11 September 2013, at 02:23.
60 page views in the last 30 days.