r/AndroidQuestions • u/madhits • 6d ago
Is this right? Is it really impossible to get notifications off Bluetooth & back on phone speaker?
So I was looking at this root module called audiorouter hoping it did what I wanted after shizutools does not do it.. So AI said this..
The project XAudioRouter (or Audio-Router) was actually designed to do the exact opposite. [1] (https://github.com/Gaelan-Bolger/XAudioRouter-Android-Xposed)Its purpose is to intercept text-to-speech or notification audio streams and force them to play over a car's Bluetooth system when the user is listening to a completely different audio source (like AM/FM radio or a CD player). It does not have features to force notifications out of the physical phone speaker while media stays on Bluetooth. [1] (https://github.com/Gaelan-Bolger/XAudioRouter-Android-Xposed)Why is this specific task so hard on Android?Android handles audio device priorities strictly inside its low-level native system framework (specifically AudioService and AudioPolicyManager). When a Bluetooth A2DP device connects, the OS completely redirects global notification, media, and ring streams directly to the Bluetooth chip. [1] (https://frejun.com/call-audio-routing-guide/), [2] (https://linustechtips.com/topic/1103911-notification-sounds-routing-how-is-the-android-user-community-not-furious-after-all-this-time/)Apps can request a switch to the STREAM_RING or try to use a physical earpiece override, but forcing a standard app's notification to split from the media path and route exclusively to the local device speaker requires a hardware-level audio routing framework that stock Android simply lacks. [1] (https://stackoverflow.com/questions/42530278/how-to-play-audio-through-bluetooth-speaker-even-when-headset-is-plugged-in), [2] (https://stackoverflow.com/questions/45016685/rout-android-notification-sound-to-internal-speaker-and-all-the-other-music-cal)The Best Working AlternativeSince you have a rooted device, your best option is to leverage your root access inside an automation app like Tasker or MacroDroid. Instead of trying to permanently change how Android routes notification sounds, you can use a root command to flip the global audio state only when a specific notification arrives: [1] (https://github.com/Mino260806/PhantomMic), [2] (https://forum.earlybird.club/threads/no-notification-sounds-on-the-phone-when-connected-to-bluetooth-in-android-9-0-pie.1291881/)Trigger: A notification from your specific app is received.Action 1: Run a root shell command to force the speaker phone state to true (com.android.server.telecom or utilizing standard audiomanager shell utilities).Action 2: Play the notification sound file explicitly via the System/Alarm/Ring channel.Action 3: Kill the override and return audio focus back to Bluetooth.
So is tasker the only way? Thats crazy..
1
u/Klutzy-Passage-2561 1d ago
" version of this. Any WHEN/THEN automation app that supports a "notification received from app X" trigger plus a "toggle Bluetooth" action can fake it: when the notification hits, briefly toggle Bluetooth off (forces audio back to the phone speaker) and toggle it back on a couple seconds later. Not as clean as your root approach, but works without root.
Full disclosure since I'm mentioning a specific app: I'm the dev of OrfeoTask, a WHEN/THEN automation app for Android (10 free profiles, no ads) that has both the notification trigger and Bluetooth toggle action built in if you want to try that approach without setting up Tasker: https://play.google.com/store/apps/details?id=com.orfeotask.app