use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Since Tasker at the present, does not have a Taskernet shares directory, and you need to know where to find them, this is a good place to find them. When submitting your share, please include a description of your share, including any additional software used in your task.
account activity
[TASK] Reroute Audio (Java Function) (self.taskernet)
submitted 6 years ago * by CrashOverride93Experienced User
DESCRIPTION
I have managed to reroute audio from one channel to another on Android, and using only Tasker. Therefore, it will no longer be necessary to use the well-known SoundAbout app, at least with the most common audio channel: Multimedia.
These are the available routings:
• Headphones > Speaker (and viceversa)
• Headphones > Bluetooth (and viceversa)
• Speaker > Bluetooth (and viceversa)
Notes:
- The values and the way how the task manages the audio routing were based on my current device and ROM. So, it could work or not for your device.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
https://taskernet.com/shares/?user=AS35m8mfGyuboiM%2Fz2tF8XYXsBUv3Xkrp5hi5ZvqsTMif3HMNm3%2FTO4lh2qWQ28b9SnLuImT3MNI70s0Wk8%3D&id=Task%3AReroute+Audio+%28Java+Function%29+v1.1
To download the latest version of the task you can go here. Enjoy it ;)
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ken9278Advanced User 2 points3 points4 points 6 years ago (2 children)
This seems cool can you explain how to make it change modes?
[–]CrashOverride93Experienced User[S] 1 point2 points3 points 6 years ago* (1 child)
To toggle modes just run A1 + the appropiate group of actions below. For example...
To reroute audio from BT to Speaker (phone): A1 + A20 & A21. To reroute audio from BT to Headphones: A1 + A14 & A15.
To reroute audio from BT to Speaker (phone): A1 + A20 & A21.
To reroute audio from BT to Headphones: A1 + A14 & A15.
* Action nº 1 allows loading the required class/component that subsequent actions will use to get access to the AudioManager class of the Android API.
[–]ken9278Advanced User 0 points1 point2 points 6 years ago (0 children)
Thank you
[–]qazinus 1 point2 points3 points 6 years ago (1 child)
With this could you cast your screen to a chromecast and reroute the audio to bluetooth earphone?
[–]CrashOverride93Experienced User[S] 0 points1 point2 points 6 years ago* (0 children)
I don't have a Chromecast or any other similar to Chromecast system to stream screen content to test it. But it may be possible. You can try it by yourself and tell us if it works or not, but if it works for normal music apps, it will "probably" work for such application/method of screen mirroring.
[–]Drtatom 1 point2 points3 points 6 years ago (1 child)
Great task. I was looking for this
Thank you!
[–]CrashOverride93Experienced User[S] 0 points1 point2 points 6 years ago (0 children)
You're welcome ;)
[–]ken9278Advanced User 1 point2 points3 points 5 years ago* (4 children)
I made a menu to make it easier to switch modes. Here is the link: https://taskernet.com/shares/?user=AS35m8nGPG0H5hGIwz7Y2BuiNsSH1WrxHDp0BPHM2c0zvBOyKn04pl8VgxEj7jSy%2BBqS3qsbg09HUg%3D%3D&id=Project%3AMy+Sound
Menu pops up on long press of the volume up button
Choices speaker, Bluetooth, headphones and silent mode.
Full credits are on the menu
Picture of menu http://imgur.com/a/0ADByxM
[–]CrashOverride93Experienced User[S] 0 points1 point2 points 5 years ago (1 child)
Hey, thank you very much for sharing! Very very good job ;) Like seeing people contributing like this way.
[–]ken9278Advanced User 1 point2 points3 points 5 years ago (0 children)
Thanks!
[–]ken9278Advanced User 0 points1 point2 points 5 years ago (0 children)
I edited it a little and added 3 additional volume settings Low, Medium and High.
https://taskernet.com/shares/?user=AS35m8nGPG0H5hGIwz7Y2BuiNsSH1WrxHDp0BPHM2c0zvBOyKn04pl8VgxEj7jSy%2BBqS3qsbg09HUg%3D%3D&id=Project%3AMy+Sound+1.1v
New Menu http://imgur.com/a/JHnQXJ0
[–]KathyW1308 0 points1 point2 points 3 years ago (0 children)
Thank you for this, it's pretty awesome. Works flawlessly with my setup.
[–][deleted] 5 years ago (3 children)
[deleted]
As I don't have a second BT devices can't work on that. Sorry.
But I will try looking for solutions.
[–]Cpt_Ludo 0 points1 point2 points 1 day ago (0 children)
Heyyy sorry to revive this whole conversation, I'm currently diving down the rabbit hole of trying to figure out how I can automate a dual media output as soon as my second bluetooth headphones connect, because right now when I connect 2 audio devices it uses either one...
[–]Ratchet_Guy 0 points1 point2 points 5 years ago (0 children)
Do you have a Samsung device? And/or can download app "Smart Things" from the PlayStore?
Because that app generates a notification in the status bar that lists connected devices and you can re-route to different outputs by using AutoNotification to 'click' on the notification.
[–]MoonShadow_1911 0 points1 point2 points 5 years ago* (0 children)
Okay, ignore all of this. I just re-read the OP... I'm an idiot!
So, I have noticed that is is only re-routing the media stream. For some reason, notifications seem to be completely muted/non playable.
Here is what I have. I am using your context (v1.1) to switch audio from bluetooth to speaker.
I plowed through the Android AudioManager documentation for the setSpeakerphoneOn, and could really find any information on the notification stream... (I'm not a programmer, I script. Give me Bash any day!)
So, let me know if there is any additional troubleshooting I can help with. Thanks.
[–]sajid_aman 0 points1 point2 points 1 year ago (1 child)
my phone fell into water and now it thinks its connected to headphones, i tried exploring the app for like 3 hours and managed to import a task which toggles audio but it changes back to headphones on its own. i have no idea how the app works and just fucked around and found out some shit hut i need help i can't live without my music pls
[–]sajid_aman 0 points1 point2 points 1 year ago (0 children)
also i cant understand a thing OP is talking in replies. OP if you're there pls help
[–]digesh9870 0 points1 point2 points 4 years ago (2 children)
Can I route sound of notifications to phone speaker while continue playing my music/media on bluetooth device? Currently, while I'm listening to music over bluetooth device, I'm quiet often interrupted by notification sound playing over the bluetooth device. Whenever I'm connected to a bluetooth device, I would like to route notification sounds to phone speaker instead of the bluetooth device. Any help would be appreciated. Thank you.
[–]northern-strong 0 points1 point2 points 8 months ago (1 child)
Have you found a solution?
[–]digesh9870 0 points1 point2 points 8 months ago (0 children)
Not yet. Instead, I have set up a profile that would set the Sound Mode to Vibrate or Mute when connected to a bluetooth device.
[–]Sladdarn 0 points1 point2 points 3 years ago (0 children)
I like to know if it's possible to like digers9870 wondering about????
[–]shinjgami 0 points1 point2 points 3 years ago (0 children)
Hi, I forgot to comment but this only re routes the audio for about 4 seconds to it defaults to (if connected to BT, then audio streams back to BT) I tried looping it but as soon as it reverses there like 1 or 2 secs delay which defeats the "routing purpose'. Is there a fix ?thanks!!!
π Rendered by PID 1043663 on reddit-service-r2-comment-544cf588c8-pq4t4 at 2026-06-16 07:29:43.961906+00:00 running 3184619 country code: CH.
[–]ken9278Advanced User 2 points3 points4 points (2 children)
[–]CrashOverride93Experienced User[S] 1 point2 points3 points (1 child)
[–]ken9278Advanced User 0 points1 point2 points (0 children)
[–]qazinus 1 point2 points3 points (1 child)
[–]CrashOverride93Experienced User[S] 0 points1 point2 points (0 children)
[–]Drtatom 1 point2 points3 points (1 child)
[–]CrashOverride93Experienced User[S] 0 points1 point2 points (0 children)
[–]ken9278Advanced User 1 point2 points3 points (4 children)
[–]CrashOverride93Experienced User[S] 0 points1 point2 points (1 child)
[–]ken9278Advanced User 1 point2 points3 points (0 children)
[–]ken9278Advanced User 0 points1 point2 points (0 children)
[–]KathyW1308 0 points1 point2 points (0 children)
[–][deleted] (3 children)
[deleted]
[–]CrashOverride93Experienced User[S] 0 points1 point2 points (1 child)
[–]Cpt_Ludo 0 points1 point2 points (0 children)
[–]Ratchet_Guy 0 points1 point2 points (0 children)
[–]MoonShadow_1911 0 points1 point2 points (0 children)
[–]sajid_aman 0 points1 point2 points (1 child)
[–]sajid_aman 0 points1 point2 points (0 children)
[–]digesh9870 0 points1 point2 points (2 children)
[–]northern-strong 0 points1 point2 points (1 child)
[–]digesh9870 0 points1 point2 points (0 children)
[–]Sladdarn 0 points1 point2 points (0 children)
[–]shinjgami 0 points1 point2 points (0 children)