Hi,
I am trying to understand, how android os or audio layer interprets 2 taps of button A as skip to next track event. Here is the website for reference
https://source.android.com/devices/accessories/headset/expected-behavior
When user presses the middle button on wired headset, the os will receive
Keyevent ACTION_DOWN, KEYCODE_MEDIA_PLAY_PAUSE
keyevent ACTION_UP, KEYCODE_MEDIA_PLAY_PAUSE
twice in sequence and somehow that gets converted to MEdia_next event so that players like vlc skip to next track in the Playlist
I don't think it's the app doing anything but the os in the middle interpretating those events in sequence as next event.
Can someone help me where should I look
Regards
Related
There is this app for iPod Touch called Activator (only when jailbroken) which lets me bind lots of controls to different buttons. For instance, when I hold the volume up key, I can set the device to play the next song. Or when I hold the power key, it toggles rotation on or off.
Now I'm wondering if there is such an app for android, especially to control the music (previous/next song, pause, play, ..) with hardware keys.
I was looking for earphones with mic and in the description it stated this-
Single button remote (Pickup call/hangup, Play/Pause, Next track)
I was wondering, how does this single button Play/Pause AND change songs?
Hi,
can anyone tell me how to fast forward when using the headphones when i double tap all it does is call the last dialled number.
I have installed headset button control trial and double tap works but not all the time.
Having same issue, guess that's just how sense is. I don't like.
Sent from my HTC One using xda app-developers app
I just got my phone yesterday, coming from Galaxy S3, and am having the same issue.
If no music program is running and I press the button on the remote, it starts the music program (google music) and plays a song.
If I press the button while music is playing, it pauses/resumes the song.
If i double press the button while music is playing, it stops the song and dials the last number.
If I i plug my 3 button Galaxy S3 headphones with 3 button remote into the HTC one, all 3 buttons (Previous, Next, Middle button) work.
How do I get the stock headphones to be able to skip to the next track?
I was having the same kind of issue, when double pressing the button to skip to the next track it will dial the last number called (when you end the call it does skip the track)
After researching I found this: which then made me believe the One has the same issue
http://forums.androidcentral.com/htc-one-x/175730-next-song-double-tap-call.html
I've been using the app "Headset Button Controller" and it's been working fine since
I have Plantronics Backbeat Pro 2 bluetooth headset, it has few buttons:
play/pause
prev track
next track
button with few functions: single press - call/end call, double press - call last number, long press - voice search
Is it possible and how is it possible to intercept in code various presses of the last button described?
Intercepting MEDIA_BUTTON intents works only for first three buttons. onKeyDown also doesn't work.
I read that the headset communicates with the phone via AT commands. The second question is: Is it possible and how is it possible to intercept this commands?
Target phone is: Xiaomi Redmi Note 4X, rooted.
I will be glad of any help.
Just got the Razer hammerhead ANC headphones. They sound amazing. There is only one drawback. The middle button on the remote does not skip songs in Spotify (using two clicks). They do work in other apps like SoundCloud or Play Music. The Huawei headset that came with the phone does work with Spotify. Is there a fix for this other than the workaround I found? Will try to explain expected and actual behaviour below.
1: Start playlist on Spotify and click middle button on headset remote pauses song. This is good.
2: Start playlist on Spotify double click middle button, repeats first action twice. This is not so good
3: Start playlist on Spotify
- use Google assistant to skip song (with Spotify on screen open Google assistant by pressing on screen "home button", select keyboard and type/use voice command "next")
- double click middle button, skips to next song. Strange but ok(why?)