New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
vijay555
Old
(Last edited by vijay555; 10th February 2009 at 08:23 PM.)
#1  
vijay555's Avatar
Retired Moderator - OP
Thanks Meter 20
Posts: 5,772
Join Date: Jun 2005
Location: Witch Space
Default [App] VJWMPlayerControl - Windows Media Player Handsfree

Guys,

I've been asked here and there if it's possible to do something useful with the wired headset on HTC phones.

I've written a set of apps, VJPoOf, which can be used to remap the press and hold and double tap functions of the headset.

I've also been asked if these remapped functions can be used to control Windows Media Player.
I'm not sure if anyone has written an external control for Windows Media Player - I'm sure they have, but I always re-invent the wheel, so here goes.
[My old favourite, PHM tools, seems to have stopped working ]

VJWMPlayerControl: as ever, a hardcore command line only tool.
It supports the following command line options:

[Control functions]
-playpause
-stop

-previous
-next

-shuffle
-repeat

-volup
-voldown

[Options/Screens]
-nowplaying
-library
-options
-fileinfo

Please find out how to make a shortcut with a command line if you don't know how (see my website).

So, example usage is:
VJWMPlayerControl.exe playpause
will obviously toggle play or pause if WMP is currently up and a track is playing.

WMP does not have to be on screen for you to use these functions.

The app currently has limited functionality, but has a lot of use if you need it! Use it with MortScript etc and you can control various functions of WMP. Use it to control WMP from Touchflo, or your Today Screen etc.

This app is hot off the press and relatively untested with Videos etc, but works fine for me with audio.

My usage is to use VJPoOf to remap the wired headset on my Touch HD, so that I can launch WMP by pressing and holding the headset button.
If WMP is not running, this will launch WMP and start playing the first track in your music library, so you don't need to touch the phone to start playing music.

When playing music, press and hold again to skip to the next track, and double tap the button to pause/play.

Please note - this usage has to be set up using a combination of VJPoOf and VJWMPlayerControl, for full flexibility in how you might want to set things up. You will need how to set up VJPoOf (not difficult!) to do this.

Also note, if WMP is not running, VJWMPlayerControl will try to launch WMP, and automagically start playing music (if there's any in your music library. If not, it'll launch missiles on Russia - I think...). This is so you can start running WMP handsfree, with the handsfree.
Note, this even works when the phone is switched off, so just insert your headset and press and hold (with VJPoOf) to launch WMP.

Let me know if it works for you or if you can think of other features to add.

Oh, and donate. My children eat cement for roughage

V

Download from here:
http://www.vijay555.com/vj/releases/...yercontrol.cab



releases: www.vijay555.comtwitterdonatefrappr
 
bbobeckyj
Old
#2  
bbobeckyj's Avatar
Senior Member
Thanks Meter 5
Posts: 958
Join Date: Aug 2006
Location: dorset
Hi Vijay,

It's good to see you're active around here again recently.

I would have loved this about a week ago when I was trying to get mortscript to shuffle my playlist after a set time, but I found the registry entry for it instead

the updated VJBrisk & VJPoOf seem good too.
 
Daniel1515
Old
(Last edited by Daniel1515; 12th March 2009 at 03:02 PM.)
#3  
Member
Thanks Meter 0
Posts: 41
Join Date: Jul 2008
Location: Melbourne, Australia
What programming language is this written in? Is it possible to get the source code of the app?

Also, I think I might write something similar for the TouchFLO3D media player (AudioManager). Eventually.
Edit: Got previous and next track working with the Touch Flo 3D player. Can't seem to get play and pause working properly for now. Will try it again soon when I have more time.
 
robned
Old
#4  
Member
Thanks Meter 0
Posts: 33
Join Date: Oct 2008
Hi Daniel,

I''ve been trying to figure out a way to run the HTC Touch HD remote with wired headset (something HTC should have thought about?). But with the builtin TF3D music player..
Ufnortunately my skills were lacking...

Is there any chance I can be your beta tester? Drop me a line... I can live witouth play / pause... but next and previous is nice... ;)

Regards.
 
teodosius
Old
#5  
Junior Member
Thanks Meter 0
Posts: 3
Join Date: Feb 2009
Default Conduits Pocket Player Support

Hello

I was wondering if Conduits Pocket Player 4.0 support could be implemented in the next release?

It is only a question of running pocketplayer.exe with the right command line parameters.

Here is the command list (taken from pocketplayer forum):

>>>>>>>

Here are some command line options that are recognized by Pocket Player. To use these, you would target your shortcut to:

\Program Files\Pocket Player\pocketplayer.exe [command name and options, without brackets]

FileOrUrl Will begin playing the track
/VOLUME=N Where N is from 0 to 255, will change the volume
/SILENT Will start Pocket Player hidden
/ENQUEUE X Will enqueue track X to Now Playing

And the format that controls playback:

/COMMAND C1 [optional: C2 C3 C4 C5]

This option takes one to five numbers on the command line, and then processes those numerical commands. Here are some of the numerical commands recognized in that form:


Play/Pause 1
Play 2
Pause 3
Stop 4
Next 5
Back 6
Mute 7
Volume up 8
Volume down 9
Screen toggle 10
Vis toggle 11
Jump fwd 12
Jump back 13
Hide/show 14
Bookmark 16
Lock/unlock 17
Unlock 18
Repeat/shuffle toggle 21
Eq toggle 28
Dsp toggle 30
Browse 31
Seek to marker 33

__________________
Conduits Support
support@conduits.com

>>>>>>>>>>>>>

example: Storage Card\Program Files\Pocket Player\pocketplayer.exe" /COMMAND 1 5 17

It would be even simpler if the app would just run pocket player and let the user input their own command line parameters.

The procedure would be simple to implement but unfortunately i lack the programming knowledge

Please?
 
lpaso
Old
#6  
lpaso's Avatar
Senior Member
Thanks Meter 2
Posts: 495
Join Date: Apr 2006
Location: Papeete
Hi ViJay.

I use your command line tool with a mortscript to launch WMP.

I remarked that when WMP is playing the whole library (ie : when launching WMP with the "VJWMPlayerControl.exe playpause"), it uses a lot of memory, and at this moment, the "STOP" function doesn't work anymore, while others do. "VJWMPlayerControl.exe stop" acts like nothing happened.
lpaso
^ it's a "L", not a "I" !

ITMobility.blogspot.com
 
vijay555
Old
#7  
vijay555's Avatar
Retired Moderator - OP
Thanks Meter 20
Posts: 5,772
Join Date: Jun 2005
Location: Witch Space
Hi lpaso!

Could you write everything you do that shows the bug, step by step, so I can do it on my phone and try to fix it.

Thanks!

V
releases: www.vijay555.comtwitterdonatefrappr
 
lpaso
Old
#8  
lpaso's Avatar
Senior Member
Thanks Meter 2
Posts: 495
Join Date: Apr 2006
Location: Papeete
Hi ViJay,

Thank you for your support

Here are the steps I follow :

- I have about 1000 songs on my Touch HD, using a 16GB µSD card.
- When I launch WMP using your command line tool (vjwmplayercontrol.exe playpause), the player launches, go to the first song of my library, then starts to play.
- at this moment, I'm not able to use the "stop" function of your tool : it doesn't work.

I remarked it was occuring when WMP uses a huge amount of memory. For example, before launching WMP, my phone has about 30% of memory used. When I launch WMP and start playing song, it can go up to 85% of memory used.

When the player uses this amount, the stop function doesn't work at all, while other functions work very well.

If I push "pause", then wait about 15min, WMP starts to decrease its amount of used memory, and I'm able to use the "stop" function again.

I don't know if I'm clear enough.

If I'm not, I'll try to make a video
lpaso
^ it's a "L", not a "I" !

ITMobility.blogspot.com
 
TheRem
Old
#9  
TheRem's Avatar
Senior Member
Thanks Meter 1
Posts: 768
Join Date: Feb 2007
Location: Las Piñas
it does not work on my Viva.

i copied Redial.exe, SDDialer.exe and VJRedial.exe from vjpoof to Windows folder... i installed vjwmplayercontrol.cab... i made a shortcut VJRedial.lnk (70#"\Program Files\vijay555\VJWMPlayerControl\VJWMPlayerControl .exe" next) and VJSDDialer.lnk (74#"\Program Files\vijay555\VJWMPlayerControl\VJWMPlayerControl .exe" previous) and placed them in Windows folder... but nothing happens.
 
perern
Old
#10  
Senior Member
Thanks Meter 15
Posts: 411
Join Date: Feb 2009
Location: Matrand
Default play & pause

finally got it working..
is there a way for showing the play icon when song is paused or stopped. and the pause icon when the song is playing?


XDA PORTAL POSTS

Dos and Don’ts of Android Design

As long as you’re coming from some type of programming background, the unseen part of app … more

Expand Your Choice of Icons with Icon Themer

Icons are some of the most commonly themed elements of the Android UI, and there is certainly no … more

MicrowaveTimePicker Brings 4.2 TimePicker to 2.1+ Devices

It’s frustrating to see slick new features that you can’t use when … more

What’s Possible with CASUAL & How to Make Your Own CASUAL – XDA Developer TV

XDA Elite Recognized Developer AdamOutler is known … more