Android audio output to wired headphones and bluetooth at the same time? - java

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

Related

Turn on mobile earpiece forcefully

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.

Java Android - Force all audio to headphones

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?

Audio Live stream from Android to my laptop

I have a project where I want to implement live audio stream from users with Android phones in my LAN Network and receive them in my laptop, off which I can filter, reduce noise, control volumes of each and write the audio to the speakers.
Please help. If possible Android and Java.

Receiving audio and video on android over HDMI or USB connection

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.

Creating our own A2DP profile using java

Many of us have used bluetooth headset/earphones or alike devices having in-built programmed A2DP (advanced audio directing profile) so that they can recieve streaming audio from a standard device.
But I wanted to design (code and implement) my own bluetooth A2DP profile using java which can be installed on a mobile device so that very device can recieve and ouput streaming audio recieved from another device.
For instance: My laptop has a bluetooth stack as well as my cellphone has.
As an ordinary cellphone it does not have a A2DP profile
But what if my cellphone is connected to an amplifier and I want to dorect my laptop's audio to that amplifier wirelessly.
Proposition: if I design a installable java based (java, because its widely accepted as mobile device's supportive language) A2DP bluetooth profile then my cellphone can be used as a bluetooth based audio reciever.
But the main question is how and from where to start off?
why do not you use your Bluetooth Headset instead.This ways you can connect your bluetooth device to Amplifier and it can stream audio from both your cell as well as laptop.

Categories

Resources