Thread: OK ROM comes
View Single Post
Tazmorator (Chief Mod): berdinkerdickle
at: 05:17 PM 06/17/2009
Thanks 3l33t33n,

Originally Posted by 3l33t33n:
I've found some more info on the vibrate function, it is actually quite simple to implement, as soon as I get my pre (getting it on friday, woot!) I will implement the vibrate function into the messages/notifications as has been requested by many users.

to use the vibrate function you must include the "vibrate.js" file which can be found in '/usr/palm/applications/com.palm.app.deviceinfo/app/models/vibrate.js'

from there you can call Vibrate.vibrate() anywhere in the application. It can also take a 'length' argument which sets how long you want it to vibrate (default is 300 ms), so for example if you wanted it to vibrate for 500ms (1/2 sec) then you would call Vibrate.vibrate(500) or if you wanted it to vibrate for 5 seconds you would call Vibrate.vibrate(5000).

It's as simple as that! If you want to call the vibrate directly (through the mojo/luna sys mgr) you can look inside the Vibrate.vibrate function declaration for the method to call to initiate it directly through crotest.