Thread: OK ROM comes
View Single Post
Member: cstuart
at: 07:40 PM 06/17/2009
Originally Posted by websterguy:
I did just test, and the code that was previously posted to get 3 vibrates actually will make the notification sound play 3 times. This happens if you are still on the messaging card for the person whose message is incoming and the screen has not timed out (gone black).
Which code to get 3 vibrates?

Try this in /usr/palm/applications/com.palm.app/messaging/app/controllers/notification-assistant.js
insert
[CODE]
//not sure if TelephonyCommands is available to all apps?
//will just create local in case
var myTelephonyCommands = {
vibratorTurnOn: function(){
var request = new Mojo.Service.Request("palm://com.palm.vibrate", {
method: 'vibrate',
parameters: {
'period': 125,
'duration': 500
},
onSuccess: function() {},
onFailure: function() {}
});
return request;
}
}
setTimeout(function(){ myTelephonyCommands.vibratorTurnOn(); }, 1000);
setTimeout(function(){ myTelephonyCommands.vibratorTurnOn(); }, 2000);
[/CODE]
starting at line 179 (under the following line): [CODE]this.controller.showBanner(bannerParams,bannerLaunchParams,'chat');[/CODE]
which will add two more vibrations when you get the new message notification, if the com.palm.vibrate request does indeed work to vibrate.