Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,733,899 Members 49,365 Now Online
XDA Developers Android and Mobile Development Forum

G2 Changing the headphone button to control music playback

Tip us?
 
ash0074
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 10
Join Date: Feb 2014
Default G2 Changing the headphone button to control music playback

Hi all, hopefully someone can help me, I tried to do the change on my rooted phone from key 226 HEADSETHOOK to "key 226 MEDIA_PLAY_PAUSE"

Question is, my original line for key 226 HEADSETHOOK is formatted weird, it has no number sign and a few extra spaces stock. Do i replace it with key 226 MEDIA_PLAY_PAUSE, no number sign and no quotations? Do I mimic the spacing? Currently, this is what my headsethook looks like with the line before it and after it as well:
-------------------------------------------------------
# key 225 "KEY_BRIGHTNESSUP"
key 226 HEADSETHOOK

key 256 BUTTON_1
-------------------------------------------------------

Note how mine has 3 spaces between 226 and headsethook....should I make the new code replacing it like this?:
key 226 MEDIA_PLAY_PAUSE (there are 3 spaces between 226 and media)

And should I still skip a line after it?
 
ash0074
Old
#2  
Junior Member - OP
Thanks Meter 0
Posts: 10
Join Date: Feb 2014
Quote:
Originally Posted by ash0074 View Post
Hi all, hopefully someone can help me, I tried to do the change on my rooted phone from key 226 HEADSETHOOK to "key 226 MEDIA_PLAY_PAUSE"

Question is, my original line for key 226 HEADSETHOOK is formatted weird, it has no number sign and a few extra spaces stock. Do i replace it with key 226 MEDIA_PLAY_PAUSE, no number sign and no quotations? Do I mimic the spacing? Currently, this is what my headsethook looks like with the line before it and after it as well:
-------------------------------------------------------
# key 225 "KEY_BRIGHTNESSUP"
key 226 HEADSETHOOK

key 256 BUTTON_1
-------------------------------------------------------

Note how mine has 3 spaces between 226 and headsethook....should I make the new code replacing it like this?:
key 226 MEDIA_PLAY_PAUSE (there are 3 spaces between 226 and media)


And should I still skip a line after it?

Another note, this post is removing my spaces, so they arent showing here but the spaces are on my phone.
 
ash0074
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 10
Join Date: Feb 2014
Ok, I got it to work, I switched 164 and 226 and i was able to pause and start my music, but now i can't answer calls with that button. Is it one or the other, is there no way to make a single button headset control calls and music?
 
ash0074
Old
#4  
Junior Member - OP
Thanks Meter 0
Posts: 10
Join Date: Feb 2014
Quote:
Originally Posted by ash0074 View Post
Ok, I got it to work, I switched 164 and 226 and i was able to pause and start my music, but now i can't answer calls with that button. Is it one or the other, is there no way to make a single button headset control calls and music?
Anyone know anything on this?
 
jeffhesser
Old
#5  
Member
Thanks Meter 2
Posts: 53
Join Date: Sep 2006
Default Volume?

That was most helpful. Note for everyone, it was the qwerty.kl file (info on finding it and such here http://forum.xda-developers.com/show....php?t=1229066)

Any thoughts on the volume up and down buttons maybe?
 
bachera
Old
(Last edited by bachera; 12th March 2014 at 07:45 PM.)
#6  
bachera's Avatar
Senior Member
Thanks Meter 337
Posts: 1,433
Join Date: Sep 2013
try gonemad player
Thread Tools
Display Modes


XDA PORTAL POSTS

TWRP Now Available for the LG G Watch and Samsung Gear Live

Over the past week or so, we’ve talkedquite a bit about the first … more

Slate Calendar Helps You Organize Your Life

Without calendars in some form or another, most of our lives would be utter chaos. Unless you are … more

Shane Francis to Talk Android, Robotics, and Vision at XDA:DevCon 2014

Our international xda:devcon 14in Manchester, UK on the weekend of … more

LG G Watch Tool is a Toolkit all Owners Need

The LG G Watch is one of the first two devices hitting the market rocking the highly anticipated … more