Old 06/17/2009, 02:57 PM   #1041 (permalink)
Member
 
Join Date: Oct 2007
Posts: 168
Likes: 3
Thanks: 12
Thanked 15 Times in 11 Posts

Default

I think people want it to vibrate more than once or make it vibrate longer. I personally didn't get it to work for me. I used the exact same code and never got more than one vibrate. I even spaced out the timeouts.
pyrognome is offline  
Old 06/17/2009, 03:10 PM   #1042 (permalink)
Member
 
Join Date: Jun 2009
Posts: 5
Likes: 0
Thanks: 0
Thanked 0 Times in 0 Posts

Default

Quote:
Originally Posted by pyrognome View Post
I think people want it to vibrate more than once or make it vibrate longer. I personally didn't get it to work for me. I used the exact same code and never got more than one vibrate. I even spaced out the timeouts.
That code doesn't make it vibrate. I guess I wasn't clear enough before but, according to the comments, that code only checks that the 'play sound only' setting is set and that you're already in the chat/messaging app, and then will play one sound right away, another sound at 1 second and another at 2 second.

The vibrating seems to be handled somewhere else. If I have some time this afternoon I'll take a closer look at how the notifications/vibrations are handled.
cstuart is offline  
Old 06/17/2009, 03:18 PM   #1043 (permalink)
Member
 
zorinlynx's Avatar
 
Join Date: Jun 2009
Location: Miami, FL
Posts: 195
Likes: 0
Thanks: 0
Thanked 41 Times in 20 Posts

Default

I still can't believe one of the busiest topics in this forum has such a stupid subject line.
zorinlynx is offline  
Old 06/17/2009, 03:47 PM   #1044 (permalink)
Member
 
Join Date: Jun 2009
Posts: 3
Likes: 0
Thanks: 1
Thanked 0 Times in 0 Posts

Default Issues with Webos ROM

Quote:
Originally Posted by Gidimba View Post
Hi,
I did it through root and it realy did go smooth.
Packed everything like mentioned with the md5 on the two files etc.
but when flashing the device again it got stuck on 84%.

I reflashed with original ROM and it was successfull bit still in activation mode
HI,

I'm excatly @ the same point as Gidi,

Maybe Peef can upload his Webos file so we can enjoy, now problem for me to supply him with server space.

@peef, Please respond here or in PM.

Thanks,
Nadavi.

Last edited by NAdavi; 06/17/2009 at 04:10 PM.
NAdavi is offline  
Old 06/17/2009, 04:10 PM   #1045 (permalink)
Member
 
Join Date: Jun 2009
Posts: 31
Likes: 0
Thanks: 1
Thanked 0 Times in 0 Posts

Default

Small update from me.
even though it got stuck at 84% on my last trial,
when I removed the battery placed it back to turn on the device it booted normaly without any problem.
in fact I did have that enable wifi menu but
a. could not go back to the activation screen
b. when I reset the phone it remembered the wifi settings but still didnt activate.

pEEf - did you do any additional thing?
Gidimba is offline  
Old 06/17/2009, 04:13 PM   #1046 (permalink)
Member
 
Join Date: Jun 2009
Posts: 3
Likes: 0
Thanks: 1
Thanked 0 Times in 0 Posts

Default

Quote:
Originally Posted by Gidimba View Post
Small update from me.
even though it got stuck at 84% on my last trial,
when I removed the battery placed it back to turn on the device it booted normaly without any problem.
in fact I did have that enable wifi menu but
a. could not go back to the activation screen
b. when I reset the phone it remembered the wifi settings but still didnt activate.

pEEf - did you do any additional thing?
Gidi,

Can you please upload your rom file to any server (e.g. Yousendit.com)

Thanks,
Nadavi
NAdavi is offline  
Old 06/17/2009, 04:29 PM   #1047 (permalink)
Member
 
Join Date: Jun 2009
Posts: 14
Likes: 0
Thanks: 3
Thanked 9 Times in 4 Posts

Default

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.
3l33t33n is offline  
Old 06/17/2009, 05:14 PM   #1048 (permalink)
Member
 
pEEf's Avatar
 
Join Date: Jul 2005
Location: Berkeley, CA
Posts: 98
Likes: 0
Thanks: 26
Thanked 79 Times in 17 Posts

Default

Sorry guys, I can't upload the jar file as it contains copyrighted Palm code. If we start doing that around here, we may get shut down. I definitely don't want to cause this forum any trouble; it's an amazing resource! Besides, it's 200 megs!

Yes, mine died somewhere after 60%, but when I rebooted the phone all was well.
Once you enable WiFi, make sure the phone is indeed getting connected and can "see" the internet. Look at the IP address in the WiFi control panel and see if you can ping it from another computer on your network. If it has internet access it should activate! Just go back to the profile creation screen and follow the prompts for creating a new profile.

Keep us posted!
pEEf is offline  
Thanked By: NAdavi
Old 06/17/2009, 05:17 PM   #1049 (permalink)
Tazmorator (Chief Mod)
 
berdinkerdickle's Avatar
 
Join Date: Dec 2005
Location: P|C when the light below is green. Otherwise; I could be just about anywhere.
Posts: 10,715
Likes: 215
Thanks: 3,113
Thanked 2,773 Times in 1,851 Posts

Default

Thanks 3l33t33n,

Quote:
Originally Posted by 3l33t33n View Post
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.
__________________

Just call me Berd.
berdinkerdickle is offline  
Old 06/17/2009, 05:18 PM   #1050 (permalink)
Member
 
pEEf's Avatar
 
Join Date: Jul 2005
Location: Berkeley, CA
Posts: 98
Likes: 0
Thanks: 26
Thanked 79 Times in 17 Posts

Lightbulb Phone Radio power mod

I created a mod so I can turn off the cellular radio, but keep WiFi and Bluetooth on. There is no current way to do this, only the "Airplane Mode" which shuts off ALL radios!

I currently do not have Sprint service on my Pre, and am just using it with WiFi. This would also be useful for people wanting to save their battery if in a poor or no service area and wish to still use wifi. Another use is shutting off the phone so calls will not be received.

I posted the howto in the wiki:
pre dev wiki: Radio Power Switch
pEEf is offline  
Old 06/17/2009, 06:09 PM   #1051 (permalink)
Member
 
Join Date: Jun 2009
Posts: 51
Likes: 0
Thanks: 0
Thanked 5 Times in 5 Posts

Default

Quote:
Originally Posted by pEEf View Post
the "Airplane Mode" which shuts off ALL radios!
Actually, once in Airplane mode you can switch WiFi or Bluetooth back on individually. I would suspect it leaves the celluar radio off.
jjlucsy is offline  
Old 06/17/2009, 06:11 PM   #1052 (permalink)
Member
 
pEEf's Avatar
 
Join Date: Jul 2005
Location: Berkeley, CA
Posts: 98
Likes: 0
Thanks: 26
Thanked 79 Times in 17 Posts

Default Vibration

Quote:
Originally Posted by 3l33t33n View Post
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.
I think this is a better way to do it:

[CODE] this.serviceRequest = new Mojo.Service.Request("palm://com.palm.vibrate", {
method: 'vibrate', parameters: { 'period': 0,'duration': 250 }
});
[/CODE]

This produces one quarter-second vibrate. (250ms)

You can use this to also make pulsed vibrates, setting period to 250 and duration to 2000 will make 4 short vibrates over a 2 second span. The Period param is a "no vibrate" period, so setting it to zero makes it continuous. Duration is the length of the cycle.

The crotest is some kind of a test mode I think, and not intended for normal use (so it may break in the future).

Last edited by pEEf; 06/17/2009 at 06:13 PM. Reason: typos
pEEf is offline  
Old 06/17/2009, 06:16 PM   #1053 (permalink)
Member
 
pEEf's Avatar
 
Join Date: Jul 2005
Location: Berkeley, CA
Posts: 98
Likes: 0
Thanks: 26
Thanked 79 Times in 17 Posts

Default

Quote:
Originally Posted by jjlucsy View Post
Actually, once in Airplane mode you can switch WiFi or Bluetooth back on individually. I would suspect it leaves the celluar radio off.
LOL! I didn't know that! Still, this method is "prettier" and simpler. Airplane mode puts an annoying "Airplane Mode" and the symbol at the top of the screen, and each time, you'd have to re-enable BT & Wifi.

So my work isn't invalidated after all! =)
pEEf is offline  
Old 06/17/2009, 06:34 PM   #1054 (permalink)
Member
 
pEEf's Avatar
 
Join Date: Jul 2005
Location: Berkeley, CA
Posts: 98
Likes: 0
Thanks: 26
Thanked 79 Times in 17 Posts

Question An Idea

One thing that seems to be missing is any kind of feedback from the touchscreen. It would be cool to make the speaker "thock" and/or maybe the vibrator jump momentarily upon each valid touch. That would make it more intuitive.

Come to think of it, maybe even the keyboard could benefit as well.

Of course, we could make it selectable so it can be enabled only if desired.

I have no clue (as yet) where the touchscreen is processed, but it's likely in a binary somewhere. But I bet Palm has included an event trigger somewhere in there. Anyone have any ideas?
pEEf is offline  
Old 06/17/2009, 06:42 PM   #1055 (permalink)
Member
 
Join Date: Jun 2009
Location: Minneapolis, MN
Posts: 58
Likes: 0
Thanks: 6
Thanked 7 Times in 6 Posts

Default

Quote:
Originally Posted by pEEf View Post
One thing that seems to be missing is any kind of feedback from the touchscreen. It would be cool to make the speaker "thock" and/or maybe the vibrator jump momentarily upon each valid touch. That would make it more intuitive.

Come to think of it, maybe even the keyboard could benefit as well.

Of course, we could make it selectable so it can be enabled only if desired.

I have no clue (as yet) where the touchscreen is processed, but it's likely in a binary somewhere. But I bet Palm has included an event trigger somewhere in there. Anyone have any ideas?
YES! That would be awesome. In my last firmware flash on the HTC Touch, the ROM included a program that made the phone vibrate every so slightly with each touch. Made using the phone feel a lot more precise cuz you KNOW your touch triggered.
Kimleng is offline  
Old 06/17/2009, 06:43 PM   #1056 (permalink)
Member
 
Join Date: Jun 2009
Posts: 14
Likes: 0
Thanks: 3
Thanked 9 Times in 4 Posts

Default

Quote:
Originally Posted by pEEf View Post
I think this is a better way to do it:

[CODE] this.serviceRequest = new Mojo.Service.Request("palm://com.palm.vibrate", {
method: 'vibrate', parameters: { 'period': 0,'duration': 250 }
});
[/CODE]

This produces one quarter-second vibrate. (250ms)

You can use this to also make pulsed vibrates, setting period to 250 and duration to 2000 will make 4 short vibrates over a 2 second span. The Period param is a "no vibrate" period, so setting it to zero makes it continuous. Duration is the length of the cycle.

The crotest is some kind of a test mode I think, and not intended for normal use (so it may break in the future).
I agree, I got looking at some more code examples and have constructed a function to craft a custom vibrate, you can define the period aswell as the duration as function arguments, just call the function with the necessary values and you're good to go!

[CODE]
vibratorTurnOn: function(aPeriod, aDuration){
var request = new Mojo.Service.Request("palm://com.palm.vibrate", {
method: 'vibrate',
parameters: {
'period': aPeriod,
'duration': aDuration
},
onSuccess: function() {
QDLogger.log("Successfully initialized vibrator");
},
onFailure: function() {
QDLogger.log("Error initializing vibrator");
}
});
return request;
}
[/CODE]

pEEf, thanks for the suggestion, I had a suspicion that crotest is/will be unreliable for applications but for testing purposes I figured it would do fine.
3l33t33n is offline  
Old 06/17/2009, 07:10 PM   #1057 (permalink)
Member
 
Join Date: Jun 2009
Posts: 14
Likes: 0
Thanks: 0
Thanked 2 Times in 1 Post

Default

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).
websterguy is offline  
Old 06/17/2009, 07:40 PM   #1058 (permalink)
Member
 
Join Date: Jun 2009
Posts: 5
Likes: 0
Thanks: 0
Thanked 0 Times in 0 Posts

Default

Quote:
Originally Posted by websterguy View Post
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.
cstuart is offline  
Old 06/17/2009, 07:48 PM   #1059 (permalink)
Member
 
Join Date: Jun 2009
Posts: 14
Likes: 0
Thanks: 0
Thanked 2 Times in 1 Post

Default

Ok, so

[code]
this.serviceRequest = new Mojo.Service.Request("palm://com.palm.vibrate", {
method: 'vibrate', parameters: { 'period': 0,'duration': 250 }
});
[/code]

seems to work!

I inserted into the function

[code]
if (notificationData.keys().length > 0 && this.Messaging.messagingPrefs.enableNotification) {
[/code]

first thing, before

[code]
var notificationType = notificationData.get('notificationType');
[/code]

Set the duration to 1500, and now my phone vibrates for 1.5 seconds when I get a txt. Not a very strong vibrate, but it works.
websterguy is offline  
Old 06/17/2009, 07:49 PM   #1060 (permalink)
Member
 
Join Date: Jun 2009
Posts: 14
Likes: 0
Thanks: 0
Thanked 2 Times in 1 Post

Default

cstuart, I meant Scott's original code many many pages back that someone updated to bind.
websterguy is offline  
Closed Thread
webOS Nation Forums  > webOS apps and software > webOS development   OK ROM comes

Thread Tools
Display Modes


LinkBacks (?)
LinkBack to this Thread: http://forums.webosnation.com/webos-development/184378-ok-rom-comes.html
Posted By For Type Date
webos - Gizmodo This thread Refback 05/15/2010 09:41 PM
Noticias Palm Pre en español Post #0 Refback 06/22/2009 07:05 AM
Palm Pre Hacked - Enable Developer Mode and Gain Root Access! This thread Refback 06/22/2009 02:47 AM
Palm Pre -- Engadget Japanese This thread Refback 06/21/2009 11:39 PM
Who's getting a Palm Pre - Page 5 - Rage3D Discussion Area This thread Refback 06/20/2009 11:35 AM
WebOS File System Contents - Colin Charles - FriendFeed This thread Refback 06/19/2009 12:02 AM
Recent palmpre Bookmarks on Delicious This thread Refback 06/18/2009 10:56 PM
'Hello World!' to Palm Pre - M for Mature Forums This thread Refback 06/18/2009 09:56 PM
Palm Pre Gets Its First Homebrew App, WebOS "Easy to Modify" [Palm Pre] - Download Monkey - VOD Discussion This thread Refback 06/18/2009 09:08 PM
jwz - Palm Pre This thread Refback 06/18/2009 05:52 AM
VIDEO: OMG! Original Doom game running near perfectly on Palm Pre | PalmTwit Best source of Palm Pre news This thread Refback 06/17/2009 02:22 PM
Slashdot Mobile Story | Palm Pre Does Not Get US Tethering Either This thread Refback 06/17/2009 07:47 AM
Slashdot | Palm Pre Does Not Get US Tethering Either This thread Refback 06/17/2009 12:28 AM
Slashdot Mobile Story | Palm Pre Does Not Get US Tethering Either This thread Refback 06/17/2009 12:21 AM
Please, Please...Develop for the Pre! This thread Refback 06/16/2009 11:06 PM
Palm Pre coming June 6 - Page 7 - AppleNova Forums This thread Refback 06/16/2009 09:14 PM
Slashdot Comments | Palm Pre Does Not Get US Tethering Either This thread Refback 06/16/2009 09:13 PM
The Pre/preDevCamp thread - StartupKC | Google Groups This thread Refback 06/16/2009 04:51 PM
Captains Log: 11 Juni 2009 This thread Refback 06/16/2009 03:19 PM
WebOs -- Engadget Mobile This thread Refback 06/16/2009 02:46 PM
Palm Pre Gets Its First Homebrew App, WebOS "Easy to Modify" | Gamingaisle This thread Refback 06/16/2009 02:34 PM
OK ROM comes - Page 15 - PreCentral Forums - Mobile This thread Refback 06/16/2009 12:02 PM
Palmista Blog: Konami Code: způsob jak "hacknout" Palm Pre This thread Refback 06/16/2009 09:05 AM
Pre Hacking - Palm Pre Development Talk | Google Groups This thread Refback 06/14/2009 09:42 AM
Palm's WebOS-ROM - xda-developers This thread Refback 06/14/2009 06:34 AM
ミニーの独り言 (´○`)はぁ~ This thread Refback 06/14/2009 06:03 AM
Palm Pre Apps - Gizmodo This thread Refback 06/14/2009 01:29 AM
Engadget 中文版 This thread Refback 06/14/2009 12:20 AM
Groundspeak Forums > Palm Pre Phone This thread Refback 06/13/2009 10:58 PM
honer123's Bookmarks on Delicious This thread Refback 06/13/2009 09:37 PM
programming This thread Refback 06/13/2009 05:39 PM
Portátiles, móviles y otros gadgets. Gizig - Pgina 2 This thread Refback 06/13/2009 03:27 PM
Palm Pre Really Needs TAKEphONE and 2Day! This thread Refback 06/13/2009 10:08 AM
ijվ ǵվ - Palm Pre,webOS - [Ѱɡ]Palm Pre̳ Palm Pre,QWERTY,ȫֻ,ֻ,Palm Treo,Centro,iPhone,blackberry - Powered by Discuz! This thread Refback 06/13/2009 08:02 AM
ミニーの独り言 (´○`)はぁ~ This thread Refback 06/13/2009 05:56 AM
胖梨Palm Pre 的秘密 - Konami code This thread Refback 06/13/2009 03:46 AM
Engadget 中国版 This thread Refback 06/13/2009 03:22 AM
Palm Twit Best source of Palm Pre news This thread Refback 06/13/2009 01:02 AM
pre dev wiki: Global Search Addons Collection This thread Refback 06/13/2009 12:03 AM
Engadget en español This thread Refback 06/12/2009 10:49 PM
Let the hacking commence This thread Refback 06/12/2009 09:23 PM
Rodfather - FriendFeed This thread Refback 06/12/2009 07:15 PM
Engadget This thread Refback 06/12/2009 05:10 PM
Engadget 中文版 This thread Refback 06/12/2009 04:37 PM
WebOSMania! El futuro Palm Pre GSM será 3.5G: 7.2Mbps This thread Refback 06/12/2009 04:32 PM
Please, Please...Develop for the Pre! This thread Refback 06/12/2009 02:57 PM
AnandTech This thread Refback 06/12/2009 02:38 PM
Alltop - Top Macintosh News This thread Refback 06/12/2009 01:35 PM
pre dev wiki: Change the default notification.wav Sound This thread Refback 06/12/2009 01:27 PM
Mobile Phones on I4U News This thread Refback 06/12/2009 12:59 PM


 

Content Relevant URLs by vBSEO 3.6.0