Jump to content

Control TouchPlayer using the headphones button!


Guest frmariam

Recommended Posts

Guest frmariam

Unless I'm seriously missing something here the Omnia headphones button has only one action (regardless of duration or number of presses) unlike HTC headphones... And all the apps I found so far that control media players using the button from the stock wired headset fail to do anything.

After confirming that the headphones button behaves as the call button and knowing the existence of supbro's GreenButton app I came up with an idea of how to control a media player using a couple of simple MortScripts. I tested this concept using TCPMP because it was easy (get cab here ). I just recently found a PointUI applet named PointSenseMusic that had what I needed to learn how to control TouchPlayer.

Instructions:

1- Install Mortscript

2- Install the TouchPlayer Headphone.cab to the phone memory.

3- Restart your phone

4- When TouchPlayer is running:

a. 1 press = play/pause

b. 2 presses = next

c. 3 presses = previous

Notes:

1- The device can't be locked

2- The device can't be on standby (you can however turn off the screen)

3- The timing is a bit quirky (this is because of the time the scripts take to load).

PS: If someone could use the sources of GreenButton and mod it to:

1- Add ability to recognize different kinds of presses (1, 2, 3... or maybe long-press) and trigger different actions (3 command in the lnk) it would correct the timing issues.

2- Run any file type (not just exe files).

3- Make a call when the dialer window is the active window (currently GreenButton disables this behaviour).

Edited by frmariam
Link to comment
Share on other sites

Guest frmariam

Ok I think this deserves a bump... Just adapted my scripts to control TouchPlayer using the headphone. Enjoy!

And if you know a bit of code please consider the PS in the first post :)

Edited by frmariam
Link to comment
Share on other sites

Guest frmariam

Post your feedback after you tested this :) I'm also curious if it works in the Omnia2 and other non-HTC devices...

I suspect I may have been too optimist with the "sleep" times between presses (the "Previous" function suffers most). If needed open player.mscr with a notepad and increase the sleep times to 500 or 600.

I made this as a proof-of-concept to test my idea and fix this obvious flaw (I mean if a guy who can't code can come up with this why the hell didn't Samsung do it?)... I released it to raise some awareness and hopefully find a developer willing to update GreenButton (since I'm a mere scripter this about the best I can do). The concept works but to be perfect GreenButton needs to be modified...

Edited by frmariam
Link to comment
Share on other sites

  • 3 months later...
Guest frmariam

It's possible that the same principle can be used to control the radio but I won't do it, sorry... I don't have much time to spend until the end of the year to try finding the message calls for the radio app (which I never even use).

Anyway this thread is failing its main purpose... It was supposed to be a proof of concept meant to capture the attention of a willing developer to update GreenButton (anyone with basic knowledge of C/C++ should be able to pull this off). Seems like there are not many developer here at modaco (the most common thing that pops-up around here are roms, themes and hacks/ports of other devices software) and over at XDA (where things aren't much better either... most "development" consists on Manila/Sense hacks) everyone as an HTC which can already do this so I haven't had much luck either...

What's more disappointing is that this wasn't even an i900 specific thing... The same concept could be used with all other non-HTC models and any other apps... But seems like there's not much love for Samsung owners.

Edited by frmariam
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.