是否有目前支持这样做的应用程序？ Android API甚至是否支持多个音频输出目标？
- htc evo 4g（rooted）
- Forevevo 3.5.1（基于Android 2.2）
I use my phone to play music at work. When I wander away from my desk, I often leave my headphones plugged in. If someone calls my phone when the headphones are plugged in, the phone rings, but only through the headphones and I end up missing the call. What I would like is to be able to set different audio to play through different outputs: my audio player through my headphones and my ringtone through my speaker. I've looked through the sound settings and haven't found much that seems incredibly useful.
Are there any apps that currently support doing this? Does the android api even support multiple audio output targets?
I was going to suggest CyanogenMod also, if that doesn't work or isn't something you are interested in, you should try Tasker
It pretty much can do just about anything you can think of without quite as much work as writing an app yourself.
I had a similar issue at work. What i ended up doing was turning the "Vibrate" setting on in
Settings/Sounds. My phone was bugging everyone else in the office before (which is why i started using headphones) but with that setting, the phone vibrates on receiving a call as well as ringing in the headphones. I didn't have to disturb anyone, and i still got calls when i forgot about my headphones!
Don't know if this would be practical for you, but it worked nicely for me, so i thought i'd share!
CM had indeed a
persist.sys.ring-speaker property to do exactly this. I don't believe it was ever available outside of the android 2.3 tree though (and as of 2020, developers don't even seem to realize there is a need for "choice").
Then, while I think a "native routing selection setting" (like some vendors already independently offer) is the best solution, workarounds should still be doable. A phone dialer automatically switching/mirroring audio for you would be my second best idea, but unfortunately I'm not aware of any having such feature.
For this reason, the only other possible option is some kind of notification listener, re-routing the sound, or playing a new separate tone of its own, when a call approaches. In this thread "Shouter" was recommended, and I have to say it works quite neatly (a tasker recipe can also be found there, for more advanced users).
Take note, not all devices may like playing more than a single audio stream at once.