Bypassing the android default music player when bluetooth connected

3,564 views
Skip to first unread message

technogeezer

unread,
Jan 5, 2015, 1:02:53 PM1/5/15
to tas...@googlegroups.com
I like to listen to songs picked randomly from my collection while driving.  My phone connects to my car as an 'audio player' and the default Android player, 'Music', launches.  I have Music set to random and this combination works fairly well.  But it does not work exactly as I would like.

I have been experimenting with Tasker's music play and music play dir actions.  Unfortunately, music play and music play dir have some issues which cause them to be unusable.

I tried using MediaControl and Media Button Event.  It appears that profiles based upon media buttons sometimes miss button events.

I tried using a separate app, Media Buttons, along with Tasker but still, no joy.

We all know that no application can do everything perfectly.  My intent is to bypass Android's Music app and use a music app of my choosing.  Is this possible with Tasker?  Is there some magic procedure I am not getting?

Thanks

Scott

unread,
Jan 5, 2015, 3:36:52 PM1/5/15
to tas...@googlegroups.com
It's possible to change the default app your phone uses.  I'm not sure the process is consistent from phone to phone or Android version to Android version, but a quick Google search should give you a step by step process on how to do it with your specific hardware and Android version.

Matt R

unread,
Jan 5, 2015, 7:01:12 PM1/5/15
to tas...@googlegroups.com
If you can, disable/uninstall all other music players.  Otherwise, you'll have headaches.  You could try the media utilities plugin, though it hasn't been updated in over a year.

Matt

technogeezer

unread,
Jan 6, 2015, 7:48:14 AM1/6/15
to tas...@googlegroups.com
Thanks, guys.

I had already tried changing the default but it didn't work.  Over bluetooth, Android (at least on my phone) seems to force using 'Music'.

I tried disabling 'Music' and it still played when I got in my car.  I verified that Music was disabled and it still launched and played!

I'm thinking they really haven't got all the bugs worked out of this car<>bluetooth<>phone thing yet.

Matt R

unread,
Jan 6, 2015, 4:52:09 PM1/6/15
to tas...@googlegroups.com
Wow, a music app was able to run even when disabled?  That's irritating!

Matt

technogeezer

unread,
Jan 21, 2015, 10:02:56 AM1/21/15
to tas...@googlegroups.com
Follow up.

As you probably suspected, I was wrong - disabling the default player stops it from running.  I must of only thought I disabled it.

However, I've been playing with the media button grab feature in Tasker in an attempt to understand why I can't seem to get stable handshaking from my car.

My goal: when Bluetooth connects, I want to play a single .mp3 file and then play random selections from my music collection continuously thereafter.  That doesn't sound too difficult, does it?  The .mp3 file says something cool like, "Bluetooth connected.  Returning control to manual."

But my car appears to send a lot of kruft to my handset when my Android phone connects as an 'audio player'.  I see at least one pair of play-stop commands upon BT connect, but not consistently.

I have tried intercepting the commands using Tasker's Media Button actions and event handling but I the actual operation is variable.  Sometimes it works as expected and sometimes there is this long stutter of the player starting and stopping.  Logging reveals that what the car sends is indeed inconsistent.

I'm about to give up.  Any suggestions from any of you good folks?

Thanks

easiuser

unread,
Jan 21, 2015, 10:42:43 AM1/21/15
to tas...@googlegroups.com
Not ideal but if the car only sends the random commands for a short period of time, you could turn the volume down to 0 to mute any output and wait for the commands to stop.  At that point you could stop the media player, turn the volume back up and initiate your startup task.

technogeezer

unread,
Jan 21, 2015, 11:30:54 AM1/21/15
to tas...@googlegroups.com
Thanks, easiuser!

I have tried that but the time required to complete the random length 'power up' cycle is prohibitive.

I suspect the issue is improper handshaking when I intercept the media commands from the car.  I also suspect the car emulates a Bluetooth headset.  Perhaps my car is performing improper handshaking.

I wish I knew more about Bluetooth handshaking.  The Bluetooth spec is like twenty thousand pages.

Thanks

Craig Bradley

unread,
Jul 12, 2017, 3:46:25 AM7/12/17
to Tasker
https://play.google.com/store/apps/details?id=com.cp2.start.and.play.music.player&rdid=com.cp2.start.and.play.music.player

This app solves the problem. I have just installed it, is easy to configure what you want to open when a device connects. I have not tested the battery use of app yet, but will keep you posted.
Reply all
Reply to author
Forward
0 new messages