webOS Nation Forums >  webOS apps and software >  webOS development > Making the phone vibrate
Making the phone vibrate

  Reply
 
LinkBack Thread Tools Display Modes
Old 08/02/2009, 12:19 PM   #1 (permalink)
Member
 
TheMarco's Avatar
 
Join Date: Jun 2009
Location: Sunnyvale CA
Posts: 699
Likes Received: 6
Thanks: 19
Thanked 160 Times in 72 Posts
Default Making the phone vibrate

Does anyone know what to call if I want to make the phone vibrate? I can't seem to find what servicerequest to use for this.
__________________
My shiny new TouchPad apps: Scientific RPN Calculator HD - Screamager HD
TheMarco is offline   Reply With Quote
Old 08/02/2009, 12:54 PM   #2 (permalink)
Member
 
Join Date: Jun 2009
Posts: 54
Likes Received: 0
Thanks: 6
Thanked 7 Times in 7 Posts
Default

Go to sounds & ringtones, and make sure vibrate and sounds are both on. If you don't want a ringer just turn the sound slider down.

Still waiting for more vibrate options though (eg vibrate 2 or 3 times for sms/emails.

Hope that helps.
dswissmiss is offline   Reply With Quote
Old 08/02/2009, 12:57 PM   #3 (permalink)
Member
 
Join Date: Jul 2009
Posts: 77
Likes Received: 0
Thanks: 12
Thanked 4 Times in 3 Posts
Default

I think he's referring to programming?
mynameisjim is offline   Reply With Quote
Old 08/02/2009, 12:59 PM   #4 (permalink)
Member
 
Join Date: Jun 2009
Posts: 54
Likes Received: 0
Thanks: 6
Thanked 7 Times in 7 Posts
Default

Ah, my bad!
dswissmiss is offline   Reply With Quote
Old 08/02/2009, 01:01 PM   #5 (permalink)
Member
 
Join Date: Jul 2009
Posts: 390
Likes Received: 0
Thanks: 8
Thanked 38 Times in 31 Posts
Default

Quote:
Originally Posted by dswissmiss View Post
Go to sounds & ringtones, and make sure vibrate and sounds are both on. If you don't want a ringer just turn the sound slider down.

Still waiting for more vibrate options though (eg vibrate 2 or 3 times for sms/emails.

Hope that helps.
Ya, this is in the "web OS Development" subforum. Users don't generally look "servicerequest" to use to "call" something.
JKTex is offline   Reply With Quote
Old 08/02/2009, 03:05 PM   #6 (permalink)
Member
 
TheMarco's Avatar
 
Join Date: Jun 2009
Location: Sunnyvale CA
Posts: 699
Likes Received: 6
Thanks: 19
Thanked 160 Times in 72 Posts
Default

I got a bit further, saw this:

this.controller.serviceRequest ("palm://com.palm.vibrate", {
method: 'vibrate', parameters: { 'period': 0,'duration': 100 }
});

When I do this, the emulator logs:

Error: service request: com.palm.vibrate is not running

This makes sense in the emulator. On the actual phone nothing happens.
__________________
My shiny new TouchPad apps: Scientific RPN Calculator HD - Screamager HD
TheMarco is offline   Reply With Quote
Old 08/02/2009, 04:44 PM   #7 (permalink)
Member
 
TheMarco's Avatar
 
Join Date: Jun 2009
Location: Sunnyvale CA
Posts: 699
Likes Received: 6
Thanks: 19
Thanked 160 Times in 72 Posts
Default

Ok I figured it out. The app needs the com.palm.app.xxxxx name in order for this to work. I have created a version of my scientific RPN calculator with vibrating keyboard feedback with this
__________________
My shiny new TouchPad apps: Scientific RPN Calculator HD - Screamager HD
TheMarco is offline   Reply With Quote
Old 08/03/2009, 08:50 AM   #8 (permalink)
Member
 
Join Date: Jun 2009
Posts: 63
Likes Received: 0
Thanks: 1
Thanked 2 Times in 2 Posts
Default

Very cool. Bumping this for more inspiration.
lionsgraphics is offline   Reply With Quote
Old 08/17/2009, 10:47 AM   #9 (permalink)
Member
 
Join Date: Jun 2009
Posts: 61
Likes Received: 0
Thanks: 7
Thanked 11 Times in 8 Posts
Default

Was there a conclusion on this? When I try the standard service call

this.controller.serviceRequest(
"palm://com.palm.vibrate",
{method: 'vibrate', parameters: { 'period': 0,'duration': 75 }}
);

I'm still getting "com.palm.vibrate is not running". How do I fix this?
FirstStryke08 is offline   Reply With Quote
Old 08/17/2009, 01:36 PM   #10 (permalink)
Member
 
Join Date: Jun 2009
Posts: 61
Likes Received: 0
Thanks: 7
Thanked 11 Times in 8 Posts
Default

Has anyone tried this serviceRequest code above?
FirstStryke08 is offline   Reply With Quote
Old 08/17/2009, 01:43 PM   #11 (permalink)
Member
 
TheMarco's Avatar
 
Join Date: Jun 2009
Location: Sunnyvale CA
Posts: 699
Likes Received: 6
Thanks: 19
Thanked 160 Times in 72 Posts
Default

Where do you get this? It should run absolutely fine. I get this error in the emulator (which can of course not vibrate, doh ) and you also get it when your app doesn't have a com.palm.app.xxx ID.
__________________
My shiny new TouchPad apps: Scientific RPN Calculator HD - Screamager HD
TheMarco is offline   Reply With Quote
Old 08/17/2009, 02:43 PM   #12 (permalink)
Member
 
Join Date: Jun 2009
Posts: 61
Likes Received: 0
Thanks: 7
Thanked 11 Times in 8 Posts
Default

Oh, now I see what you mean with the com.palm.app.xxx. I'm guessing that means that I won't be able to use any kind of touch feedback in Palm's app store? I did get it to work, but now a dialog pops up after it vibrates saying "{"returnValue":true"". What is that all about? Why isn't vibrate a standard Service like LBS or video playback?
FirstStryke08 is offline   Reply With Quote
Old 08/17/2009, 06:58 PM   #13 (permalink)
Member
 
Join Date: Jun 2009
Posts: 61
Likes Received: 0
Thanks: 7
Thanked 11 Times in 8 Posts
Default

Still getting that error... Any ideas?
FirstStryke08 is offline   Reply With Quote
Old 08/17/2009, 10:44 PM   #14 (permalink)
Member
 
Join Date: Jun 2009
Posts: 61
Likes Received: 0
Thanks: 7
Thanked 11 Times in 8 Posts
Default

bump
FirstStryke08 is offline   Reply With Quote
Old 08/17/2009, 11:44 PM   #15 (permalink)
Member
 
TheMarco's Avatar
 
Join Date: Jun 2009
Location: Sunnyvale CA
Posts: 699
Likes Received: 6
Thanks: 19
Thanked 160 Times in 72 Posts
Default

I have no idea. It works fine for me.

About the com.palm.app thing: We'll have to see what Palm is gonna do / say about that.
__________________
My shiny new TouchPad apps: Scientific RPN Calculator HD - Screamager HD
TheMarco is offline   Reply With Quote
Thanked By: FirstStryke08
Old 08/24/2009, 12:48 PM   #16 (permalink)
Member
 
Join Date: Jul 2009
Posts: 79
Likes Received: 0
Thanks: 11
Thanked 4 Times in 3 Posts
Default

how would you write something to make the phone vibrate when you touch the main screen like the ripple. Everytime there is a ripple there is a vibrate
Converse420 is offline   Reply With Quote
Old 10/29/2009, 07:38 PM   #17 (permalink)
Member
 
Join Date: Jul 2009
Posts: 79
Likes Received: 0
Thanks: 11
Thanked 4 Times in 3 Posts
Default

when I use this in my app I can't seem to get the vibrate to vibrate on time. There seems to be a sec or two delay. I use it on a button and it pushes a scene. I get the jolt but its late. Then the same thing on toggle. Its late. Any idea to fix it.
Converse420 is offline   Reply With Quote
Old 12/01/2009, 05:15 PM   #18 (permalink)
Member
 
Join Date: Dec 2009
Posts: 1
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by TheMarco View Post
Ok I figured it out. The app needs the com.palm.app.xxxxx name in order for this to work. I have created a version of my scientific RPN calculator with vibrating keyboard feedback with this
Can you expand on this please? Where to I set the com.palm.app.xxxx name? is it the id field in appinfo.json?
wildabeast is offline   Reply With Quote
Old 12/12/2009, 08:52 AM   #19 (permalink)
Member
 
Join Date: Oct 2009
Posts: 160
Likes Received: 1
Thanks: 40
Thanked 35 Times in 19 Posts
Default

Quote:
Originally Posted by wildabeast View Post
Can you expand on this please? Where to I set the com.palm.app.xxxx name? is it the id field in appinfo.json?
Yep! Don't forget when packing the output will be a file namend com.palm.app.xxx! Don't use your old packaged file when installing via "palm-install".

Thanks very much. Worked for me!
JuJulian1987 is offline   Reply With Quote
Old 12/12/2009, 01:13 PM   #20 (permalink)
Member
 
pimpmypre's Avatar
 
Join Date: Jun 2009
Posts: 428
Likes Received: 0
Thanks: 23
Thanked 150 Times in 63 Posts
Default

I use a vibe as "haptic feedback" in WOG O.S.K. and didn't have to use the palm name.
Here's the one line I call.

Mojo.Controller.getAppController().playSoundNotification("vibrate", "",1)


where 1 is the duration of the vibe in ms. Can't seem to get it any less than 10, but it vibrates on screen touch.

Using the palm.app namespace will keep your app out of the app catalog.
__________________
WOG Dev - WebOS Group http://www.WebOSGroup.com
PMP Dev - http://www.PimpMyPre.com
Apps: WOG O.S.K., WOG Card Keeper, WOG Glowstick, WOG Kid Protect, PreLoad, PimpMySounds
pimpmypre is offline   Reply With Quote
Thanked By: MetaView
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0