Jump to content
Poweramp
SuryaChandra

Bluetooth headset control not working

Recommended Posts

Player is not accepting input from my Bluetooth headset (Boat Rockers 600). But when I connect a wired headset and disconnected, Bluetooth controls started working fine. And if I restart my phone or the app gets restarted (like after force close but not after closing and opening app) I have to connect and disconnect the wired headset again. And the track control by volume buttons(when screen is off) is also working after connecting wired headset until app gets restarted as stated above.

BTW UI is awesome

I am using OnePlus 2 with RR 6.0 (oreo 8.1.0)

Share this post


Link to post
Share on other sites

I have the same problem, Poweramp is not responding to bluetooth controls. Works fine with another player. Tried the headset solution, not working for me.

Using Alpha 709 on OnePlus 3 OxygenOS 5.0.1 (Android 8.0 based). Was working fine on Android 7.1

Share this post


Link to post
Share on other sites

Same Problem here with my OnePlus 3. Worked fine with my Galaxy S7 and after switching to the Oneplus its not working any more. With Spotify for example it works. I'm using a FM Transmitter with Bluetooth.

Share this post


Link to post
Share on other sites
On 22/05/2018 at 10:05 AM, Ishtakh said:

I have the same problem, Poweramp is not responding to bluetooth controls. Works fine with another player. Tried the headset solution, not working for me.

Using Alpha 709 on OnePlus 3 OxygenOS 5.0.1 (Android 8.0 based). Was working fine on Android 7.1

Tried to downgrade to version 2.0.10 (build 588) by opting out of beta program on Play Store, works fine with this version

Share this post


Link to post
Share on other sites

Thanks for the reports. It’s interesting as none of my bt decices show such behavior.

Question:

- if you open PA, hit play in it, and then hit pause on your bt device - what happens then? 

 

Share this post


Link to post
Share on other sites

Enable "Keep service" in Misc -> Tweaks and disable "Battery Optimisation" for Poweramp in the system settings than try again.

Share this post


Link to post
Share on other sites
1 hour ago, maxmp said:

Thanks for the reports. It’s interesting as none of my bt decices show such behavior.

Question:

- if you open PA, hit play in it, and then hit pause on your bt device - what happens then? 

 

No response. Same as before

Share this post


Link to post
Share on other sites
50 minutes ago, clever_man said:

Enable "Keep service" in Misc -> Tweaks and disable "Battery Optimisation" for Poweramp in the system settings than try again.

No improvement. Moreover it's not working even when the app is in foreground

Share this post


Link to post
Share on other sites
5 minutes ago, SuryaChandra said:

No response. Same as before

 

4 minutes ago, SuryaChandra said:

No improvement. Moreover it's not working even when the app is in foreground

Same here in both cases (with build 703)

Share this post


Link to post
Share on other sites
22 hours ago, SuryaChandra said:

No response. Same as before

That means something prevents headset events (there is no difference in Android APIs between wired headset/BT headset or even lock screen buttons events) from reaching Poweramp. I guess, this is some 3rd party app or system tweak. It's hard to debug without such affected device on hands.

If you have adb installed on computer and is able to debug further, please:

- connect device to computer
- let Poweramp be playing something (on bt)
- in terminal/console run:

adb shell dumpsys media_session

- copy paste output here (there is no any private information in such dump). Basically it shows which apps hold the headset controls

- also after few buttons click on headset:

adb shell dumpsys bluetooth_manager

This will dump rather large amount of info, so it can be done this way:

adb shell dumpsys bluetooth_manager > bluetooth_manager_dump.txt

bluetooth_manager_dump.txt then appears in current directory - can be zipped/uploaded to forum. This shows which A2DP commands were recently received and processed. For example:

AVRCP:
  deviceInfo : 31:8, 1, -1, -1
  mMediaAttributes: [MediaAttributes: D...s - H...n by M...m (213800 22/124) ]
  mTransportControlFlags: 0
  mCurrentPlayState: PlaybackState {state=3, position=941, buffered position=0, speed=1.0, updated=739037992, actions=895, custom actions=[], active item id=-1, error=null}
  mPlaybackIntervalMs: 1000
  mNextPosMs: 44041
  mPrevPosMs: 42041
  mLastRemoteVolume: -1
  mLastDirection: 0
  mAudioStreamMax: 150
  mVolCmdAdjustInProgress: false
  mVolCmdSetInProgress: false
  mAbsVolRetryTimes: 0
  mMediaController: android.media.session.MediaController@36aede2 pkg com.maxmpz.audioplayer
  SupportedActions play:4 pause:2 stop:1 prev:16 next:32 ff:64 rew:8 playFromQueue:0
  
  Media Players:
   *#1: MediaPlayerInfo com.maxmpz.audioplayer (as 'Poweramp') Type = 1, SubType = 0, Status = 1 Feature Bits [40 41 42 44 45 47 48 58] Controller: MediaController (com.maxmpz.audioplayer@36aede2) Dominant Genes, Maxim, Hell's Kitchen
    #2: MediaPlayerInfo com.google.android.music (as 'Google Play Music') Type = 1, SubType = 0, Status = 0 Feature Bits [40 41 42 44 45 47 48 58 59 65] Controller: null
    #3: MediaPlayerInfo com.sec.android.app.music (as 'Samsung Music') Type = 1, SubType = 0, Status = 0 Feature Bits [40 41 42 44 45 47 48 58 59 65] Controller: null
  
  AddressedPlayer info:
  mLastTrackIdSent: -1
  mNowPlayingList: 0 elements
  
  25 passthrough operations: 
    (last 10)
    05-24 05:37:08 KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audioplayer in 783ms
    05-24 05:37:08 KeyEvent { action=ACTION_UP, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audioplayer in 3ms
    05-24 05:37:08 KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audioplayer in 2162ms
    05-24 05:37:10 KeyEvent { action=ACTION_UP, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audioplayer in 1ms
    05-24 05:37:10 KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audioplayer in 946ms
    05-24 05:37:11 KeyEvent { action=ACTION_UP, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audioplayer in 5ms
    05-24 05:37:11 KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audioplayer in 813ms
    05-24 05:37:12 KeyEvent { action=ACTION_UP, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audiopla

Share this post


Link to post
Share on other sites
MEDIA SESSION SERVICE (dumpsys media_session)

4 sessions listeners.
Global priority session is com.android.server.telecom/HeadsetMediaButton (userId=0)
  HeadsetMediaButton com.android.server.telecom/HeadsetMediaButton (userId=0)
    ownerPid=3723, ownerUid=1000, userId=0
    package=com.android.server.telecom
    launchIntent=null
    mediaButtonReceiver=null
    active=false
    flags=65537
    rating type=0
    controllers: 0
    state=null
    audioAttrs=AudioAttributes: usage=2 content=1 flags=0x0 tags= bundle=null
    volumeType=1, controlType=2, max=0, current=0
    metadata:size=0, description=null
    queueTitle=null, size=0
User Records:
Record for full_user=0
  Volume key long-press listener: null
  Volume key long-press listener package: 
  Media key listener: null
  Media key listener package: 
  Callback: android.media.session.ICallback$Stub$Proxy@93a1b73
  Last MediaButtonReceiver: PendingIntent{8a7220a: PendingIntentRecord{944ba7b com.maxmpz.audioplayer broadcastIntent}}
  Restored MediaButtonReceiver: null
  Media button session is com.maxmpz.audioplayer/Poweramp (userId=0)
  Sessions Stack - have 2 sessions:
    Poweramp com.maxmpz.audioplayer/Poweramp (userId=0)
      ownerPid=1499, ownerUid=10117, userId=0
      package=com.maxmpz.audioplayer
      launchIntent=null
      mediaButtonReceiver=PendingIntent{8a7220a: PendingIntentRecord{944ba7b com.maxmpz.audioplayer broadcastIntent}}
      active=true
      flags=3
      rating type=0
      controllers: 4
      state=PlaybackState {state=3, position=235, buffered position=0, speed=1.0, updated=1968730007, actions=895, custom actions=[], active item id=-1, error=null}
      audioAttrs=AudioAttributes: usage=1 content=2 flags=0x0 tags= bundle=null
      volumeType=1, controlType=2, max=0, current=0
      metadata:size=7, description=I Burn in You, Lacuna Coil, Broken Crown Halo
      queueTitle=null, size=0

    spotify-media-session com.spotify.music/spotify-media-session (userId=0)
      ownerPid=8834, ownerUid=10142, userId=0
      package=com.spotify.music
      launchIntent=PendingIntent{9371098: PendingIntentRecord{11090f1 com.spotify.music startActivity}}
      mediaButtonReceiver=PendingIntent{b9d54d6: PendingIntentRecord{55a8357 com.spotify.music broadcastIntent}}
      active=true
      flags=3
      rating type=0
      controllers: 2
      state=PlaybackState {state=0, position=0, buffered position=0, speed=0.0, updated=0, actions=141312, custom actions=[], active item id=-1, error=null}
      audioAttrs=AudioAttributes: usage=1 content=0 flags=0x0 tags= bundle=null
      volumeType=1, controlType=2, max=0, current=0
      metadata:size=5, description=null, null, null
      queueTitle=null, size=0

Audio playback (lastly played comes first)
  uid=10125 packages=com.rageconsulting.android.lightflow 
  uid=10025 packages=com.android.systemui 
  uid=10173 packages=com.BlingBlingGames.CraftingIdleClicker 
  uid=10117 packages=com.maxmpz.audioplayer com.maxmpz.audioplayer.unlock 

Here are my logs, using beta build 703

 

bluetooth_manager_dump.txt

Share this post


Link to post
Share on other sites
10 minutes ago, Ishtakh said:

Here are my logs, using beta build 703

Can I suggest doing the same tests with build 709. The info is probably the same for both, but it makes sense to be using the latest version when sending such reports.

Andre

Share this post


Link to post
Share on other sites

Same issue here.

I am using HTC U11 and my BT headphone is Sony WH1000XM2.

Sometimes the player can be controlled using headphone and sometimes cannot.

My Sony headphone comes with a mobile application that configures the headphone and shows information about the headphone. What song is being played will display in the app. When the Bluetooth control is not working, the song current playing will not show up in the app.

Thus, I guess the issue may be related to the metadata transmission or AVRCP. 

 

Look forward to seeing any solution.

Share this post


Link to post
Share on other sites
On 5/24/2018 at 2:54 PM, maxmp said:

That means something prevents headset events (there is no difference in Android APIs between wired headset/BT headset or even lock screen buttons events) from reaching Poweramp. I guess, this is some 3rd party app or system tweak. It's hard to debug without such affected device on hands.

If you have adb installed on computer and is able to debug further, please:

- connect device to computer
- let Poweramp be playing something (on bt)
- in terminal/console run:


adb shell dumpsys media_session

- copy paste output here (there is no any private information in such dump). Basically it shows which apps hold the headset controls

- also after few buttons click on headset:


adb shell dumpsys bluetooth_manager

This will dump rather large amount of info, so it can be done this way:


adb shell dumpsys bluetooth_manager > bluetooth_manager_dump.txt

bluetooth_manager_dump.txt then appears in current directory - can be zipped/uploaded to forum. This shows which A2DP commands were recently received and processed. For example:


AVRCP:
  deviceInfo : 31:8, 1, -1, -1
  mMediaAttributes: [MediaAttributes: D...s - H...n by M...m (213800 22/124) ]
  mTransportControlFlags: 0
  mCurrentPlayState: PlaybackState {state=3, position=941, buffered position=0, speed=1.0, updated=739037992, actions=895, custom actions=[], active item id=-1, error=null}
  mPlaybackIntervalMs: 1000
  mNextPosMs: 44041
  mPrevPosMs: 42041
  mLastRemoteVolume: -1
  mLastDirection: 0
  mAudioStreamMax: 150
  mVolCmdAdjustInProgress: false
  mVolCmdSetInProgress: false
  mAbsVolRetryTimes: 0
  mMediaController: android.media.session.MediaController@36aede2 pkg com.maxmpz.audioplayer
  SupportedActions play:4 pause:2 stop:1 prev:16 next:32 ff:64 rew:8 playFromQueue:0
  
  Media Players:
   *#1: MediaPlayerInfo com.maxmpz.audioplayer (as 'Poweramp') Type = 1, SubType = 0, Status = 1 Feature Bits [40 41 42 44 45 47 48 58] Controller: MediaController (com.maxmpz.audioplayer@36aede2) Dominant Genes, Maxim, Hell's Kitchen
    #2: MediaPlayerInfo com.google.android.music (as 'Google Play Music') Type = 1, SubType = 0, Status = 0 Feature Bits [40 41 42 44 45 47 48 58 59 65] Controller: null
    #3: MediaPlayerInfo com.sec.android.app.music (as 'Samsung Music') Type = 1, SubType = 0, Status = 0 Feature Bits [40 41 42 44 45 47 48 58 59 65] Controller: null
  
  AddressedPlayer info:
  mLastTrackIdSent: -1
  mNowPlayingList: 0 elements
  
  25 passthrough operations: 
    (last 10)
    05-24 05:37:08 KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audioplayer in 783ms
    05-24 05:37:08 KeyEvent { action=ACTION_UP, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audioplayer in 3ms
    05-24 05:37:08 KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audioplayer in 2162ms
    05-24 05:37:10 KeyEvent { action=ACTION_UP, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audioplayer in 1ms
    05-24 05:37:10 KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audioplayer in 946ms
    05-24 05:37:11 KeyEvent { action=ACTION_UP, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audioplayer in 5ms
    05-24 05:37:11 KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audioplayer in 813ms
    05-24 05:37:12 KeyEvent { action=ACTION_UP, keyCode=KEYCODE_MEDIA_NEXT, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=0, downTime=0, deviceId=-1, displayId=0, source=0x0 } to com.maxmpz.audiopla

Here are my logs with music playing in both Poweramp and play music. Everything is working fine when playing via play music but not in Poweramp

Edit: using beta preview 790

bluetooth_manager_dump_poweramp.txt

MEDIA SESSION SERVICE_poweramp.txt

MEDIA SESSION SERVICE_playmusic.txt

bluetooth_manager_dump_playmusic.txt

Share this post


Link to post
Share on other sites
On 5/23/2018 at 1:49 PM, Ishtakh said:

Tried to downgrade to version 2.0.10 (build 588) by opting out of beta program on Play Store, works fine with this version

1. Disconnect Bluetooth

2. Connect wired headset

3. Play/pause and skip track by using wired headset button

4. Disconnect headset and connect Bluetooth headset

5. Try Bluetooth headset buttons.

6. Enjoy

Share this post


Link to post
Share on other sites
On 5/24/2018 at 1:59 PM, andrewilley said:

Can I suggest doing the same tests with build 709. The info is probably the same for both, but it makes sense to be using the latest version when sending such reports.

Andre

Sorry, will be unable to do so (even though I had the bug also on build 709) Upgrading from build 588 using Build 709 uni.apk restored bluetooth controls... I don't understand...

Can anyone confirm it's working for them also ?

Share this post


Link to post
Share on other sites
21 hours ago, Ishtakh said:

Sorry, will be unable to do so (even though I had the bug also on build 709) Upgrading from build 588 using Build 709 uni.apk restored bluetooth controls... I don't understand...

Can anyone confirm it's working for them also ?

Started working at first. But not after a reboot. Build 790

Share this post


Link to post
Share on other sites
1 hour ago, SuryaChandra said:

Started working at first. But not after a reboot. Build 790

Build 790, or the 709 build that I suggested trying?

Andre

Share this post


Link to post
Share on other sites

I am having this same problem, LG V30 on 8.0 using Build 709 with a set of LG Tone Platinums HBS1100. Unfortunately I don't have access to a computer right now so I can't check at this time.

Share this post


Link to post
Share on other sites

Just thought that I would say that I use a BT headset ( these …  https://www.amazon.co.uk/gp/product/B07B9R67WR/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1   ) and the remote commands work fine. It is BT 5, though I don't know if that makes a difference.

On the BT side though, tags do not get to my car head unit - well, they do sometimes but I cannot narrow any particular sequence that makes them work/not work. This is an ongoing issue though.

 

Oh, using 790 PA.

Share this post


Link to post
Share on other sites

I also have some issues with the bluetooth buttons. The volume up/down buttons work fine, the main BT button also pauses/resumes playback correctly. The main issue is that, with the music paused, when I "long press" the volume up button to activate the Google Assistant, both the google assistant activates AND Poweramp resumes playback, and immediately shuts off the assistant voice recognition. Basically, I'm unable to use the google assistant with my bluetooth headset connected (for me, one of the main times that it is actually useful).

I have tried to play with the bluetooth settings in Poweramp (long press, triple press, etc.) without any change in behavior.

Old Poweramp versions used to work fine (before Android 8.1.0). Also, I don't have this problem with other music players.

Thank you for your help!
Dom

Debug info:
Phone: Moto G4 Play (harpia)
Android Version: 8.1.0 (AospExtended-v5.6-OFFICIAL)
Bluetooth headset: Aukey EP-B16
Poweramp version: 709

>adb shell dumpsys media_session
* daemon not running. starting it now at tcp:5037 *
* daemon started successfully *
MEDIA SESSION SERVICE (dumpsys media_session)

3 sessions listeners.
Global priority session is com.android.server.telecom/HeadsetMediaButton (userId=0)
  HeadsetMediaButton com.android.server.telecom/HeadsetMediaButton (userId=0)
    ownerPid=1388, ownerUid=1000, userId=0
    package=com.android.server.telecom
    launchIntent=null
    mediaButtonReceiver=null
    active=false
    flags=65537
    rating type=0
    controllers: 0
    state=null
    audioAttrs=AudioAttributes: usage=USAGE_VOICE_COMMUNICATION content=CONTENT_TYPE_SPEECH flags=0x0 tags= bundle=null
    volumeType=1, controlType=2, max=0, current=0
    metadata:size=0, description=null
    queueTitle=null, size=0
User Records:
Record for full_user=0
  Volume key long-press listener: null
  Volume key long-press listener package:
  Media key listener: null
  Media key listener package:
  Callback: android.media.session.ICallback$Stub$Proxy@40ce07
  Last MediaButtonReceiver: PendingIntent{306529: PendingIntentRecord{a23c0ae com.maxmpz.audioplayer broadcastIntent}}
  Restored MediaButtonReceiver: null
  Media button session is com.maxmpz.audioplayer/Poweramp (userId=0)
  Sessions Stack - have 1 sessions:
    Poweramp com.maxmpz.audioplayer/Poweramp (userId=0)
      ownerPid=3552, ownerUid=10113, userId=0
      package=com.maxmpz.audioplayer
      launchIntent=null
      mediaButtonReceiver=PendingIntent{306529: PendingIntentRecord{a23c0ae com.maxmpz.audioplayer broadcastIntent}}
      active=true
      flags=3
      rating type=0
      controllers: 3
      state=PlaybackState {state=3, position=39957, buffered position=0, speed=1.0, updated=101567299, actions=895, custom actions=[], active item id=-1, error=null}
      audioAttrs=AudioAttributes: usage=USAGE_MEDIA content=CONTENT_TYPE_MUSIC flags=0x0 tags= bundle=null
      volumeType=1, controlType=2, max=0, current=0
      metadata:size=7, description=Five to One, The Doors, The Best of The Doors (disc 1)
      queueTitle=null, size=0

Audio playback (lastly played comes first)
  uid=10036 packages=com.google.android.googlequicksearchbox
  uid=10113 packages=com.maxmpz.audioplayer.unlock com.maxmpz.audioplayer

bluetooth_manager_dump.txt

Share this post


Link to post
Share on other sites

Yes, even i m facing such problem on mu OnePlus 6. I just bought Boat 255 headphones and it responds to all apps except Poweramp version 709 on Android 8.1.

Hope to see some workaround. Tried almost everything in headset and bluetooth thing.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×