[APP] [7/3/2011] HeadsetService 1.3 (Control Music via Headset Button) HTC Supported

Search This thread

ExtremeGTX

Senior Member
Feb 17, 2011
141
312
-Description:
HeadsetService is a background app that let you control your preferred music player using wired Headset Button​
-Features:

  • Support Samsung and HTC Devices
  • Support Windows Mobile 6.1/6.5/6.5.X
  • Support Many Music Players

  • Windows Media Player
  • HTC Audio Manager
  • Core Player
  • Nitrogen
  • S2P
  • Touch Player (Omnia i900 SMPlayer)
  • Touch Player (Omnia II)
  • You Can Answer incoming call
  • Only 4KB in Memory (Samsung)
  • No Memory Usage (HTC)
  • Device can be locked (Except Headset Button)
  • Native Code (Fast Execution)
  • Press Speed Can be Changed
  • Service only Activated if the chosen player is running
  • Service will automatically launch on Startup if it is activated
  • Service can be stopped at any time (Samsung Only)
  • Support WVGA, WQVGA ,VGA, QVGA

-Updates:

Thanks for Everyone report a bug or help me fix these bugs

New in Version 1.3

  • Support Samsung Omnia II Touch Player (Player)
  • Support Samsung Omnia Headset
New Version For HTC
>>> All Reported issues Fixed​
-Installing:
Must be installed on Device Memory​
-How to Use:
Samsung Devices

  1. After installing Go to [ Start Menu->Headset Settings ]
  2. Select your preferred Player
  3. Change "Press Speed" if you need
  4. Change "Service Status" using "Status" button
  5. Click "Apply"
    For Omnia II
    • Short Press = Play\Pause
    • Long Press = Next Song
    • *Note: To goto Previous Song just triple press Call button [Omnia II headset doesn't support triple presses]
    For Omnia
    • Single Press = Play\Pause
    • Double Press = Next Song
    • Triple Press = Previous Song
HTC Devices
  • After installing Go to [ Start Menu->Headset Settings ]
  • Select your preferred Player
  • Click "Apply"

  • Double Press = Play\Pause
  • Long Press = Next Song
  • *Note: if Player is not running - headset button will return to its original settings
-Screen Shot:

picture.php
picture.php


-Future Implementation "Depend On Users needs"

  • Automatic Mode: no need to select only one player to Control
  • Deactivate Service if Phone\Contacts Application is Activated
  • Control Radio Apps
-ROM Cookers:
Just PM me
-Finally:
If you find my App useful please Donate

All comments are welcomed


"ExtremeGTX HeadsetService v1.3 .CAB" >> Samsung Devices
"ExtremeGTX HeadsetService_HTC.CAB" >> HTC Devices
No Mirrors Please

Development Stopped, Sorry for last requests
 
Last edited:

michoob

Retired Recognized Developer
Dec 19, 2008
1,270
65
Brussels
Wow, I'm looking for such a service for two years!!!!
I have to test it and give you some feedback.
In the meantime, thank you very much!

EDIT: sorry, but I've forgotten my headset at a friend's, so I won't be able to test your service in the next three weeks... so I will report later on...
 
Last edited:

poppyup

Member
Sep 25, 2009
22
5
Your application is just what i need in my daily commute :)

Unfortunately on my i900 omnia with touch player and standard stock ROM I got some error when I try to apply settings. I note also some minor glitch related the image on Settings program that it is not automatically resized to the omnia resolution (240x400).
I add some shots to this post to show you how the application appear on my device an the error i received when I try to apply seetings.:

Further than this the application partially work on my omnia. With long pressure I got the start of the play but on successive pressure I got to go on the next song and I was no able to stop the player. Basically seems doesn't recognize the differnce between single and doublke pressure :(

I hope this help to fix this wonderful app.

Thank you in advance for your effort. If I can do anything to help you, please ask!
 

Attachments

  • sshot000.png
    sshot000.png
    18.5 KB · Views: 280
  • sshot001.png
    sshot001.png
    64.5 KB · Views: 275
  • sshot002.png
    sshot002.png
    16.7 KB · Views: 194
  • sshot003.png
    sshot003.png
    13.6 KB · Views: 154
  • sshot004.png
    sshot004.png
    13.3 KB · Views: 135

esociarius

Senior Member
Dec 30, 2009
153
11
Your application is just what i need in my daily commute :)

Unfortunately on my i900 omnia with touch player and standard stock ROM I got some error when I try to apply settings. ...

Hi ExtremeGTX!

First of all: Thank you very much for your app - it was a very good idea!

But - unfortunately I have the same problems as poppyup - after pressing "apply" an error is thrown.
The keys (long or short press) allways start the HTC-Musicplayer, though I configured Coreplayer to be controlled with your app.

Best regards

esociarius
 

ExtremeGTX

Senior Member
Feb 17, 2011
141
312
Thank you Guys for testing my app
Please help me fixing this problem

i think dirs names are different in the other languages

Please Post Startup dir name and windows dir name

English:
\Windows
\Windows\Startup

German Language
i don't know if names changed

and Please tell me Version of Windows and .NET Compact Framework

my tests was on WM 6.5.3 English Rom and .NET CF 2.0
Sorry for not testing with other languages
 
Last edited:

poppyup

Member
Sep 25, 2009
22
5
In Italian:

\Windows
\Windows\Esecuzione automatica

as for Windows version is 6.1 while Net compact framework is 3.5
 
Last edited:

ExtremeGTX

Senior Member
Feb 17, 2011
141
312
Igor Lozovsky
Thanks for help
Setting app is C# but service is C++

poppyup
Thanks Man :)
Now I know what cause this problem

and I will release fix soon :)
(may be today or tomorrow)
 
Last edited:

esociarius

Senior Member
Dec 30, 2009
153
11
Thank you Guys for testing my app
Please help me fixing this problem

i think dirs names are different in the other languages

Please Post Startup dir name and windows dir name

English:
\Windows
\Windows\Startup

German Language
i don't know if names changed

and Please tell me Version of Windows and .NET Compact Framework

my tests was on WM 6.5.3 English Rom and .NET CF 2.0
Sorry for not testing with other languages

No need to apologize... you share your work with us :) - thank you for that.
In German

\Windows
\Windows\Autostart

Best regards

esociarius
 
Last edited:
  • Like
Reactions: ExtremeGTX

poppyup

Member
Sep 25, 2009
22
5
I just check the new version and the errors wnen I tried to apply settings are gone. The graphic of the setting panel was corrected, too. Congratulation!

I was able to enable the status and apply settings, but unfortunately, my setup with Touch Player doesn't work yet :(

The only thing I got when I press the headset button is the shift to the next song but I was not able to toggle the play on/off. Moreover seems that double pressure was completely ignored by the sofware :(



Ther is any other test I can perform to help your debug ?

Sent using RapidRead!
 
  • Like
Reactions: ExtremeGTX

ExtremeGTX

Senior Member
Feb 17, 2011
141
312
Thank you poppyup for Testing my app

This steps for Testing Headset and my app

Step 1:
I need you to disable the service and all players
then press on headset button for about 200ms just (a bit long press not a mouse click)
You must hear a tick sound from headset and phone app will be activated

Step 2:
Return to home\Today screen then press headset button for more than 500ms
you must hear a tick sound two times and phone app will be activated and automatically call the last contact

All above is what I notice with My Omnia II GT-i8000 WM 6.5.3:) and the annoying driver:mad:

To Check if App really working or not
Open Settings Select Touch Player , Activate the Service then Apply
Now use Green\Answer\Call Button with Touch Player and see if it work

If it doesn't work
Open Settings and Change press speed to a higher value like 900ms

Finally I hope this help you and Enjoy Listening to Music;)
 

poppyup

Member
Sep 25, 2009
22
5
Thank you poppyup for Testing my app

This steps for Testing Headset and my app

Step 1:
I need you to disable the service and all players
then press on headset button for about 200ms just (a bit long press not a mouse click)
You must hear a tick sound from headset and phone app will be activated

Step 2:
Return to home\Today screen then press headset button for more than 500ms
you must hear a tick sound two times and phone app will be activated and automatically call the last contact

All above is what I notice with My Omnia II GT-i8000 WM 6.5.3:) and the annoying driver:mad:

To Check if App really working or not
Open Settings Select Touch Player , Activate the Service then Apply
Now use Green\Answer\Call Button with Touch Player and see if it work

If it doesn't work
Open Settings and Change press speed to a higher value like 900ms

Finally I hope this help you and Enjoy Listening to Music;)

Step 1: I don't hear any sound from headset but the phone App is correctly activated.
Step 2: Also inthis case I don't hear any double sound but simply the phon application is activated like in the previous case. Please note that in order to start a call to the last contact i need to double push the headset button ;)

I perform test on your application using a setup of 949ms and with the answer call button seems to work as expected :cool: (but anyway timing is critical for get expected behaviour ;) ). Unfortunately with the headset button I was no able to replicate the call button behaviour :mad: I was no able in any way to get the player start/stop playng with different time setup :( Moreover, after I try for sometime with the headset button I was no able to replicate the previous "correctly" call button behaviour and I need to close the touch player and restart again to be able to newly control player by the call button with your service enabled.
The only thing I get with the touch player pressing the headset button it to go to the next song.

Seems to me that the call button and the headset button are not exactly the same or anyway are processed by the phone in a slighty different way.

Maybe is a timing problem related the way in which you monitor the headset button event :confused:
 

ExtremeGTX

Senior Member
Feb 17, 2011
141
312
From your post
The Key Code of Headset button and Call button is the same:)

I will Explain Press Speed Setting:
for Example "Press Speed" = 1500ms

1st Case:
you press button one time then after 1500ms from the press you will get the action "Play\Pause"

2nd Case:
you press button one time then you have less than 1500ms to press second time to get the action "Next"

with My Omnia II headset button, Long Press give me like two presses from call button
and single press (but not just like a mouse click) give me single press

May be the problem because of different headset driver:(
also I need to know what about HTC devices , is it work or not:confused:

Can you test with other players ?
and if you can post your headset driver
 
Last edited:

poppyup

Member
Sep 25, 2009
22
5
From your post
The Key Code of Headset button and Call button is the same:)

Ok for the code, but the sensitivity of the response seems to be different from my test between the two buttons. I am quite sure the call key has different debounce compared to the headset button. Maybe the different HW of the two button introduce differences in the speed of the response. As a matter of fact I was able to control the player with the call button while with the headset button seems like every press (short or long) it is translated in a double press.

I will Explain Press Speed Setting:
for Example "Press Speed" = 1500ms

1st Case:
you press button one time then after 1500ms from the press you will get the action "Play\Pause"

2nd Case:
you press button one time then you have less than 1500ms to press second time to get the action "Next"

I performed some test playing around with "Press Speed" settings and the behaviour with longest or shortest time doesn't change reallly. With some practice i could get the things works also with the 800ms default setting or less using the call button. On the contrary any short or long press of the headset button got only "next" action in player. Only one time during my test I got the player start with single headset pressure but than I was not able to stop the player anymore but only to get "next" action :confused:

Maybe you can filter the headset button pressure adding your "debounce" procedure.

If I well understood from your explanation "Press speed" is the time interval on which you evaluate 1 or 2 press to decide for "play/pause" or "next" action

I would like to suggest this strategy: after detect first pressure your app need to ignore next pressure for xx ms. This time will be obviousely < Press speed time (new settings ? ;) ) than if the new pressure arrive in the maximum time (Speed press) you can perform different action.

with My Omnia II headset button, Long Press give me like two presses from call button
and single press (but not just like a mouse click) give me single press

May be the problem because of different headset driver:(
also I need to know what about HTC devices , is it work or not:confused:

Can you test with other players ?
and if you can post your headset driver

Seem that on my i900 original omnia short or long headset button pressure are translated in double (or more) presses.

I have tried to use Windows Media Player with same identical behaviour :(
Related the driver: I don't know what is the driver name :( if you can give me some directions I can try to extract/copy it and send to you in some way.

Further than this can you modify your application to write a log capturing the pressure of the headset in a file or showing on screen the keycode and the nr of reading in the Press speed time rather than drive the player? I am sure this can help to better understand what happens.
 

ExtremeGTX

Senior Member
Feb 17, 2011
141
312
Great Work Man:) but this news disappointing me:(

Now let's begin analysis
Ok for the code, but the sensitivity of the response seems to be different from my test between the two buttons. I am quite sure the call key has different debounce compared to the headset button. Maybe the different HW of the two button introduce differences in the speed of the response. As a matter of fact I was able to control the player with the call button while with the headset button seems like every press (short or long) it is translated in a double press.

I know this different debounce of the buttons and pointed to that in Known issues section.


Only one time during my test I got the player start with single headset pressure but than I was not able to stop the player anymore but only to get "next" action :confused:
This one time makes me confused:confused:

Maybe you can filter the headset button pressure adding your "debounce" procedure.

as I know this can't be filtered, Why?
because it's related to the driver, actually two buttons has the same debounce but Samsung[i900\i8000] annoying driver is the first which receive press event then send this event to user level at which you can handle this event using any app

I have tried to build new driver but it is too much hard:eek:

If I well understood from your explanation "Press speed" is the time interval on which you evaluate 1 or 2 press to decide for "play/pause" or "next" action

Yes, this is exactly what i mean:)

I would like to suggest this strategy: after detect first pressure your app need to ignore next pressure for xx ms. This time will be obviousely < Press speed time (new settings ? ;) ) than if the new pressure arrive in the maximum time (Speed press) you can perform different action.

Thanks for this idea, i worte it down
but this may lead to another timing issues on different CPUs


Seem that on my i900 original omnia short or long headset button pressure are translated in double (or more) presses.
I will tell you again that Samsung try to annoy its users only, no less no more:D

I have tried to use Windows Media Player with same identical behaviour :(
Related the driver: I don't know what is the driver name :( if you can give me some directions I can try to extract/copy it and send to you in some way.
Open Registry
Goto HKLM\Drivers\BuiltIn\Headset <Dll: xxx.dll>
search for the dll in Windows Directory and Extract it.

Further than this can you modify your application to write a log capturing the pressure of the headset in a file or showing on screen the keycode and the nr of reading in the Press speed time rather than drive the player? I am sure this can help to better understand what happens.

i had written an application before to let me know key Codes, i will do some mods and post it.

if you have any Other Windows Mobile devices please test and tell me the result

Thank you
 

poppyup

Member
Sep 25, 2009
22
5
as I know this can't be filtered, Why?
because it's related to the driver, actually two buttons has the same debounce but Samsung[i900\i8000] annoying driver is the first which receive press event then send this event to user level at which you can handle this event using any app

I have tried to build new driver but it is too much hard:eek:

I fully understand this, but you can mask at higher level the pressure like I described in my suggestion.

Thanks for this idea, i worte it down
but this may lead to another timing issues on different CPUs

What about to create a calibration procedure logging user input for single and double pressure and use the logged data to setup the correct timing ?
In this way the differences between different devices/CPU and button will be automatically compensate by the calibration.

Open Registry
Goto HKLM\Drivers\BuiltIn\Headset <Dll: xxx.dll>
search for the dll in Windows Directory and Extract it.

Unfortunaletly my HKLM\Drivers\BuiltIn\ section of the registry doesn't show any \Headset section :( This definitely means that the driver between omnia II e I are different. (maybe there are differences due to WM 6.1 on my omnia e 6.5 on your) Anyway, if you can give me the name of Omnia II dll I can try a search in windows directory to verify if anything similar exist for Omnia I.

i had written an application before to let me know key Codes, i will do some mods and post it.

if you have any Other Windows Mobile devices please test and tell me the result

Thank you

I'am waiting for the raw test application but I suggest you to implement it in the standard Setting program for future debug and analysis.

Tomorrow I ask to a friend of mine to install your App in an LG phone mounting WM 6.5 to verify the differences in the behaviour with Samsung.
 

ExtremeGTX

Senior Member
Feb 17, 2011
141
312
I sent my app to friend has a HTC Device for testing
So, I'm waiting for results from 2 Devices <HTC , LG>

All i need to know, Is my app compatible only with Omnia II or there is another compatible devices?!

I don't know if you try to write an app for Windows Mobile before but you will find that Microsoft has a limited Framework under (C++,C#)

for KeyCode app i will PM'd you after finish
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    -Description:
    HeadsetService is a background app that let you control your preferred music player using wired Headset Button​
    -Features:

    • Support Samsung and HTC Devices
    • Support Windows Mobile 6.1/6.5/6.5.X
    • Support Many Music Players

    • Windows Media Player
    • HTC Audio Manager
    • Core Player
    • Nitrogen
    • S2P
    • Touch Player (Omnia i900 SMPlayer)
    • Touch Player (Omnia II)
    • You Can Answer incoming call
    • Only 4KB in Memory (Samsung)
    • No Memory Usage (HTC)
    • Device can be locked (Except Headset Button)
    • Native Code (Fast Execution)
    • Press Speed Can be Changed
    • Service only Activated if the chosen player is running
    • Service will automatically launch on Startup if it is activated
    • Service can be stopped at any time (Samsung Only)
    • Support WVGA, WQVGA ,VGA, QVGA

    -Updates:

    Thanks for Everyone report a bug or help me fix these bugs

    New in Version 1.3

    • Support Samsung Omnia II Touch Player (Player)
    • Support Samsung Omnia Headset
    New Version For HTC
    >>> All Reported issues Fixed​
    -Installing:
    Must be installed on Device Memory​
    -How to Use:
    Samsung Devices

    1. After installing Go to [ Start Menu->Headset Settings ]
    2. Select your preferred Player
    3. Change "Press Speed" if you need
    4. Change "Service Status" using "Status" button
    5. Click "Apply"
      For Omnia II
      • Short Press = Play\Pause
      • Long Press = Next Song
      • *Note: To goto Previous Song just triple press Call button [Omnia II headset doesn't support triple presses]
      For Omnia
      • Single Press = Play\Pause
      • Double Press = Next Song
      • Triple Press = Previous Song
    HTC Devices
    • After installing Go to [ Start Menu->Headset Settings ]
    • Select your preferred Player
    • Click "Apply"

    • Double Press = Play\Pause
    • Long Press = Next Song
    • *Note: if Player is not running - headset button will return to its original settings
    -Screen Shot:

    picture.php
    picture.php


    -Future Implementation "Depend On Users needs"

    • Automatic Mode: no need to select only one player to Control
    • Deactivate Service if Phone\Contacts Application is Activated
    • Control Radio Apps
    -ROM Cookers:
    Just PM me
    -Finally:
    If you find my App useful please Donate

    All comments are welcomed


    "ExtremeGTX HeadsetService v1.3 .CAB" >> Samsung Devices
    "ExtremeGTX HeadsetService_HTC.CAB" >> HTC Devices
    No Mirrors Please

    Development Stopped, Sorry for last requests
    3
    Hi Guys
    Now HTC Devices are Supported

    Check First Post

    Don't forget to tell me your opinion

    Thank you
    1
    thanks michoob ,esociarius
    michoob: you can test using Call\Answer Key :)

    Please Guys, Give me your Feedback
    1
    ExtremeGTX,
    use SHGetSpecialFolderPath() function to retrieve system dirs in language-independent manner:
    SHGetSpecialFolderPath(..., CSIDL_WINDOWS, ...);
    SHGetSpecialFolderPath(..., CSIDL_STARTUP, ...);
    1
    thanks a lot