[RESOLVED] [Q] Simulate a headset unplugged event to pause audio? - Android Q&A, Help & Troubleshooting

I own a GSM Galaxy Nexus and I picked up the official car dock yesterday, and I've noticed that it doesn't have an elegant method for pausing currently playing media when a disconnect is detected, like how when you unplug a headset and supported media apps will pause (e.g. Pandora or Google Music).
EDIT: Originally I was using Tasker's built-in media button functionality for pausing music, but that actually was triggering a global play/pause toggle which would toggle all apps at the same time, resulting in unwanted resumed playback from Pandora and Google Music. I managed to resolve the issue by using the Locale Headphone Button Plugin instead. With it I can issue a non-toggle pause event that only pauses tracks that are currently playing. There is absolutely no need to simulate a headset event.

I'm trying this as well, but in my car. so basically my task profile is when i have Power (any) and Bluetooth running. I plug the phone in via usb to the headunit and it auto-connects bluetooth to the unit. What i'm trying to simulate is when i turn the car off (aka....bluetooth loses connection, and in theory so does power), that any music would become paused. The simplest way is to simulate unplugging headphones since most every major music app pauses when you do that.
I downloaded Locale Headphone Button Plugin and the "Play/Pause" options works just fine in testing using the tasker in-program-test-play feature.
The issue I run into is that if I cut off the car, bluetooth dies (as it should), but as long as my USB power cord remains plugged into the phone (i.e. i haven't yet removed my phone from the glove box), the Locale Headphone Button Plugin "Play/Pause" command seems to not execute.
any ideas?

Related

[Q] bluetooth (or corded) remote

Among all it's great uses I'm using my Gtab as an MP3 player plugged into my trucks stereo. I have an MP3 player but promised it to my wife when I got the Gtab . The problem I'm having is that it's rather awkward to pause or skip tracks on the tablet while driving. I've been hunting for a small remote or steering wheel mounted remote connected through bluetooth or at this point, any connection. All I can seem to find are care MP3 players that come with remotes.
Does a universal Remote for mp3 players exist? Is there another option for limited remote control of the Gtab?
CyanogenMod has the option of using the volume keys to skip songs. You'll have to set it up to not wake up by pushing the volume keys. I don't think there is an easy way to get it to pause though, other than disconnecting the cable. Oh, and there are apps that you can get that detect when headphones are plugged in and automatically start the music app and hit play. Combining those should work for you without any extra gear.
haha, or the post right next to you http://forum.xda-developers.com/showthread.php?t=1045590

Disable control music via headset

Is there a way to turn off "use headset for music control" Like there is on Android? (Like tweaking a reg key?)
Reason for asking: I use a 3,5mm jack plug to connect my helmet headset with my phone, when I am driving my motorcycle. I like to listen music and I prefer audio for GPS navigation. Problem is that WM 6.5 keeps changing the song every second, or (when not using Sense) it loads WMplayer every now and then.
I solved this issue in android by unchecking "use headset to control music" (not sure whether it is called exactly like this".) This helps, because the issue is most likely caused by an interrupted connection with the jack plug (altough the plug seems to fit perfectly), which makes the phone think a button has been pressed for the next song. Using a different/extra plug is no option, because of helmet and space in sat nav pocket.
I could of course also kill WMPlayer and Sense music player by deleting files/reg keys (I use nitrogen which doesn't seem to be affected by the plug connection issue) but that would probably lead to a constant error stating it cannot load/find sense music player/ WMplayer.
Normally I just use android, but I need WM for tomtom navigation software. (Waypoint navigation is currently not possible with an offline application on Android)
Does nobody have a clue?
Oke, did some more digging. new question: Is there an app like "Headset Blocker" (android) available for Windows Mobile 6.5x?

[Q] bluetooth headphones disconnecting (sorta)

I recently purchased some Nokia BH-505 bluetooth headphones. I like them and I primarily use Pandora to listen to music. I'm having a periodic issue where the headphones sort of disconnect and quit playing music. This only happens when I choose to turn the screen off. If I keep the screen on, I never have any disconnect issue. Pandora is happily still streaming music though, and if I power off the headphones, the phone/pandora realizes that it's no longer connected and starts playing through the speaker of the phone (that's why I say "sort of" disconnecting). If I power the headphones on again, they connect, pandora pauses, then I can resume play and then a short time after the condition happens again (if I turn the screen off). I imagine it's some sort of memory related thing because it seems if I make sure I have no programs running in the background things seem to work as desired. I haven't found any sort of setting to tweak, and neither Pandora or any bluetooth like program is in an autoclose list.
Anyone have any ideas on any workarounds to this issue?

[Q] Stop playing on disconnect

Hi,
Before custom ROMS were built on ICS, when I was listening to streaming music in my car (via bluetooth), the phone would automatically stop playing when the car turned off. Same thing if I'm listening to music and I pull the headphones out, whatever was playing gets paused.
Now, when I turn my car off, the music doesn't stop playing, it just starts playing through the phone's speaker.
So my question is, is it the ROM that makes a player pause on disconnect or is it the actual APP that decides to either stop or keep playing through the speaker.
I know PowerAMP has options to auto play and auto stop on disconnect, but other apps like youtube, Audiostation (for my synology NAS) and a few others don't have settings.
Nic2112 said:
Hi,
Before custom ROMS were built on ICS, when I was listening to streaming music in my car (via bluetooth), the phone would automatically stop playing when the car turned off. Same thing if I'm listening to music and I pull the headphones out, whatever was playing gets paused.
Now, when I turn my car off, the music doesn't stop playing, it just starts playing through the phone's speaker.
So my question is, is it the ROM that makes a player pause on disconnect or is it the actual APP that decides to either stop or keep playing through the speaker.
I know PowerAMP has options to auto play and auto stop on disconnect, but other apps like youtube, Audiostation (for my synology NAS) and a few others don't have settings.
Click to expand...
Click to collapse
I think the fact that some apps have the option indicates that at very least, the app does have some control over it. I don't know if the ROM/kernel have some default setting built in for apps that don't define it.
It seems to be a feature missing in ICS. I'm hoping it shows up by the final update.
I use Tasker to accomplish the same thing. The whole task for media is when I plug headphones in, it launches a menu with media apps (music, netflix, etc) and turns the media volume up to 6. When disconnected, it mutes media volume, pauses media, and returns to the homescreen.
I'll take a look at that in the interim, all I really need is it just to pause on BT disconnect like it use to. The is already a separate volume setting for BT vs the headphone jack. Thanks for the tip.
That's interesting, I didn't know tasker had something to pause media. I'll definitely give that a try.
I believe that was an AOSP tweak..my Inc running CM7 would pause on bluetooth disconnect.
Sent from my ADR6425LVW using XDA

Bluetooth issues, music pausing and switching to speaker

i've been having issues with my Mate 10 Pro, in combination with both my Bose QC30 and my Bose SoundSport. i heard from someone else who has the same problem, but with a set of Jaybird X3's.
I don't think the problem comes from the QC30 or SoundSport, as they work fine with my pc (desktop pc with bluetooth dongle)
Issue 1:
I pause my music, with the headset, use the fingerprint sensor to unlock my phone and use some app. I close the app, press the power button to turn off the display and press play again on my headset. Music will play for x seconds, mostly about 5 seconds or so and then stops.
Sometimes it will start playing again after some time, but when i unlock the screen with the fingerprint scanner, it start playing immediately
Remedy (most of the time) is switching headset off and on.
Issue 2:
Listening to music through bluetooth, suddenly sound switches to the speaker on my phone. In the status bar, it shows bluetooth is still connected and it actually is, as the controls on the headset still function. But somehow the media output has switched to speaker.
Remedy is same as issue 1.
Both issues happen occasionally, sometimes don't have them for an entire week, so it's pretty hard to reproduce.
I have tried:
-reinstalled Spotify
-unpairing the headset
-deinstall Bose+ app and pair headset manually
I'm using Spotify to listen to music, Spotify has been set to manual battery management, so has the Bose+ app.
Only other thing i could do is a factory reset, but i can't imagine that will fix the problem.
Anyone else experience any of these issues?
Remedy?
I wonder if the 8.1 update (when and if they release it) would solve these issues

Categories

Resources