10/27/2009, 01:16 AM
|
#1 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
Okay, so basically, you can use a quick double press of the headset button to advance tracks in the music player. However, I often am not sure if it's advanced the track or for some reason has paused it.
I started digging and my result is this. The Pre will do a long vibration (750ms) when it advances the track, only if you're using the headset button to do so. I'll be submitting to Preware in a few minutes. Code:
--- .orig/usr/palm/applications/com.palm.app.musicplayer/scripts/MediaKeyControlHandler.js
+++ /usr/palm/applications/com.palm.app.musicplayer/scripts/MediaKeyControlHandler.js
@@ -23,6 +23,9 @@
case "next":
// start playing automatically when the song is switched
+ this.serviceRequest = new Mojo.Service.Request("palm://com.palm.vibrate", {
+ method: 'vibrate', parameters: { 'period': 0,'duration': 750 }
+ });
this.musicPlayer.setPlayingState(true);
this.musicPlayer.nextSong();
Code:
--- .orig/usr/palm/applications/com.palm.app.musicplayer/scripts/MediaKeyControlHandler.js
+++ /usr/palm/applications/com.palm.app.musicplayer/scripts/MediaKeyControlHandler.js
@@ -23,6 +23,12 @@
case "next":
// start playing automatically when the song is switched
+ this.serviceRequest = new Mojo.Service.Request("palm://com.palm.vibrate", {
+ method: 'vibrate', parameters: { 'period': 0,'duration': 750 }
+ });
+ this.serviceRequest = new Mojo.Service.Request("palm://com.palm.audio/systemsounds", {
+ method: 'playFeedback', parameters: { 'name': 'shuffle_03' }, onSuccess: {}, onFailure: {}
+ });
this.musicPlayer.setPlayingState(true);
this.musicPlayer.nextSong();
Patches here are completely open-source, I don't know the differences between any of the licenses, but please feel free to take them and improve them, especially the tones one. I know there are other methods to play sounds that might work better but they're a bit beyond my comprehension. |
10/28/2009, 11:03 PM
|
#3 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
Oh, sorry, this will only work with the built-in music player, I think. It's really a per-application thing, not a global one. I'll have to check the Pandora code when I get a chance, see if I can do the same thing.
|
10/29/2009, 02:32 PM
|
#4 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
Pandora one:
Code:
--- .orig/var/usr/palm/applications/com.palm.pandora/app/core/device_service.js
+++ /var/usr/palm/applications/com.palm.pandora/app/core/device_service.js
@@ -121,6 +121,9 @@
Util.log("media event: " + event.key);
switch (event.key) {
case "next":
+ this.serviceRequest = new Mojo.Service.Request("palm://com.palm.vibrate", {
+ method: 'vibrate', parameters: { 'period': 0,'duration': 750 }
+ });
AppGlobals.station.skip();
break;
\ No newline at end of file
|
11/01/2009, 06:16 PM
|
#5 (permalink) |
|
Member
![]() Join Date: Jul 2009
Posts: 329
Likes Received: 5
Thanks: 29
Thanked 49 Times in 34 Posts
|
so i was installing the pandora patch from preware and i accidentally pressed back while it was installing. Now i get an error about it ther being a reversed patch already. How can i remove whatever was partially installed?
|
11/02/2009, 01:10 PM
|
#6 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
Not sure on that, sorry.
Pandora had an update on 11/1 that seems to be breaking the headset button support entirely though, so I'm going to email them to see if they know about this, and maybe try changing the device_service.js back to how they used to have it. |
11/05/2009, 09:31 AM
|
#7 (permalink) |
|
Member
![]() Join Date: Oct 2009
Location: USA!!! USA!!! USA!!! USA!!!
Posts: 1,353
Likes Received: 24
Thanks: 36
Thanked 187 Times in 158 Posts
|
I have the updated pandora fom 11-1 and yep the patch is broke. The bigger problem is i cannot remove the patch right now from preware. Getting the generic error for during the pre-remove script execution. Please tell me that we dont have to run erp for this? Thanks!!
|
11/05/2009, 09:54 AM
|
#8 (permalink) |
|
Member
![]() Join Date: Oct 2009
Location: USA!!! USA!!! USA!!! USA!!!
Posts: 1,353
Likes Received: 24
Thanks: 36
Thanked 187 Times in 158 Posts
|
I have tried reinstalling Pandora and just delete Pandora and remove the patch with pandora gone and still got the error. How can I manually move the patch??
Last edited by addiarmadar; 11/05/2009 at 10:40 AM. |
11/05/2009, 11:35 AM
|
#9 (permalink) |
|
Member
![]() Join Date: Oct 2009
Location: USA!!! USA!!! USA!!! USA!!!
Posts: 1,353
Likes Received: 24
Thanks: 36
Thanked 187 Times in 158 Posts
|
Ok I fixed the issue. Used the webos quick install to remove the patch and not preware is letting me install the patch again, even though ill wait on an update for this patch
|
11/05/2009, 01:29 PM
|
#10 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
Sorry, the reason I haven't updated it is because Pandora headset support seems to be broken in general in the newest update. Even without the patch it wouldn't respond to any button presses.
|
11/14/2009, 02:31 AM
|
#11 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
Pandora is still not working with the headset button in 1.3.1.
Here's an updated version that appears to be working for me in 1.3.1 for the music player though. There's two different cases in the file now, but this one appears to be working for me. Code:
--- .orig/usr/palm/applications/com.palm.app.musicplayer/scripts/MediaKeyControlHandler.js
+++ /usr/palm/applications/com.palm.app.musicplayer/scripts/MediaKeyControlHandler.js
@@ -32,6 +32,10 @@
this.musicPlayer.nextSong();
+ this.serviceRequest = new Mojo.Service.Request("palm://com.palm.vibrate", {
+ method: 'vibrate', parameters: { 'period': 0,'duration': 750 }
+ });
+
break;
case "prev":
|
11/15/2009, 12:43 PM
|
#13 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
Yeah, it'll only patch the default music player. It looks for a specific file as part of the application, and so music player remix would stay untouched.
|
01/27/2010, 01:27 AM
|
#14 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
So Pandora's latest version was a few months ago, and it broke the headset button control entirely. I was hoping that they'd have fixed it themselves by now, but they haven't, so I just uploaded a patch that used the old method of handling the button (the one that worked) as well as adds a vibrate when you skip to the next track.
|
01/27/2010, 11:50 AM
|
#15 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
Oops, forgot to attach the actual patch file for the Pandora one for those who don't want to wait until it's in Preware.
Edit: No longer works in Pandora 1.0.1, removed attachment. Last edited by jhoff80; 02/28/2010 at 03:50 PM. |
02/02/2010, 04:58 PM
|
#19 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Los Angeles, CA
Posts: 194
Likes Received: 0
Thanks: 45
Thanked 20 Times in 9 Posts
|
OMG this is amazing! Thank you so much for taking the initiative and helping all of us out. I still can't believe Pandora's dev didn't fix this on their own, but this goes to show our community is up to any challenge.
thank you!!! |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|



