I've seen several examples of forcing audio to speakers while headphones are plugged in but what I'm trying to do is somewhat unique in that, I want to force audio to headphones when another media application would otherwise be sending that audio to your TV for example when casting to your TV via chromecast.
Is this possible?
Related
Following is the scenario:
Headphones with mic are connected to a mobile device.
What i want to achieve programmatically:
After a call is been initiated, audio from 3.5mm jack should (forcefully) be routed to mobile earpiece rather then headphone speakers, while the mic should be used of the headphones.
I have searched a lot on google but found methods only to forcefully turn on mobile external speakers.
Reference : how to turn speaker on/off programmatically in android 4.0
While, my goal is to turn on earpiece forcefully.
My research from google:
To achieve this there might be possibilities of system (root) permissions, which a third party application might need.
You may have to write a modified audio driver from sources ? As the functionality is based on the operating system.
If it is possible, can any one guide me on this ?
UPDATE
One more reference: Android - Getting audio to play through earpiece
But the above code does not work on all phones.
My goal is to make an application that can play audio files "through the mic" into a skype-call (or other programs). I want to be able to speak while the audio-file is playing. Is there a simple way of doing this?
You can achieve mixing audio devices with Virtual Audio Cable. You create a new Virtual Audio Cable as an input device that you can select in Skype. Then you can send audio from a specific application to your Virtual Audio Cable that will mix it with your microphone for example.
Before I even attempt to write this android app, I need to know if its possible to do the following with the standard Android SDK library or any known 3rd party library.
Output audio from multiple simultaneuosly playing files to both the wired headphone jack AND bluetooth A2DP at the same time.
Each file/output combination will have its own volume control in the app as well. So if the volume on file 1 is turned down on the headphones but not the bluetooth volume, it still can be heard on a bluetooth speaker but not in the headphones. Same would apply on file 2,3,4 etc
I am rather new to Android development but I wish to receive audio and video content on my phone from a pc. I am trying to record gameplay on my pc, and do not have the money to buy the hardware recorder, and I can not do screen capture and maintain acceptable fps.
What I had in mind was to send my screen and audio to my phone like a second screen, where my phone will handle the saving process, reducing cpu load on my pc. I don't think android phones can receive hdmi output, but I can do this with the USB via the android adb library "pull" command. However this requires that the file already be saved.
I can't seem to find any other way to do this, can anyone recommend a library I could use?
No. USBs are slow. And there is no way to transfer what's on your computer screen to your android device without first recording it on the computer itself and then having to pass through the slow USB device and then slowly writing it to your phone's hard drive. You'll be recording at a solid 0.5fps by then.
I have an app that allows you to record short voice memos. Some users aren't able to record any audio(LG Ally being one device) at all. I'm using the MediaRecorder in android and am curious if there might be a "better" standard way to handle audio recording?