Bluetooth stream audio to android

How to stream audio from one Android device to another Android device Via Bluetooth?

1. Almost every device supports A2DP, A2DP and HFP(Handsfree) profile are the basic profiles which phone needs. 2. Android 4.2.1 had audio streaming issues over bluetooth, it was a choppy audio which got fixed as per google in latest release. 3. Most of the people earlier had tried on bluez (open source bluetooth)stack but from JB onwards ,bluez is replaced by broadcomm stack. You need to implement audio sink profile in the phone. Audio streaming between 2 devices can be possible using Alljoyn, check link

Thank you for that link @ashish. I am go through that. And will let you know what happens. Thanks again.

Does the audio need to be streamed via Bluetooth? What about using WiFi-Direct? This would actually give you more flexibility and features.

5 Answers 5

Is it possible to stream audio over Bluetooth?

Below sort of thread says its possibility that streaming audio over Bluetooth is possible between devices but there was question mark on its success rates till Google official announced that We have fixed the a2dp streaming stutter problem on N7. The next release should have the fix. Sorry about the problem.

And does every android device support A2DP?

Support compatibility is mention on Android developers site that its added from API Level-11 with appropriate features. But I came across XDA tread where OP mention problem in Android 2.1 ,means its also support in previous api levels but OP facing issues.

Hope it make sense to understand and I would like to recommend to refer XDA forum to get more information about A2DP compatibility and its sucess.

I my opinion, if A2DP doesn’t work properly, we’d better move to lower layer, and we can create a basic stream which can be used for sending any form of date. I succeed in sending byte stream via Bluetooth between J2ME devices.

If install an app in both devices is acceptable, I’ve sample codes to create a Bluetooth server and a client to communicate with each other via socket, once the socket is established, you can send you audio stream 🙂

// you can generate your own UUID and use it as an port to eatablish a socket private static final UUID MY_UUID = UUID.fromString("20687DAD-B023-F19E-2F60-A135554CC3FD") BluetoothServerSocket serverSocket = mBluetoothAdapter.listenUsingRfcommWithServiceRecord(NAME_INSECURE, MY_UUID); 

now you have the serverSocket, just use it as an ordinary ServerSocket:

BluetoothSocket socket = serverSocket.accept(); 

and then you can get InputStream and OutputStream from this BluetoothSocket and send audio stream just like HttpConnection

Читайте также:  Настроить пионер магнитолу блютуз

assume you already got the BluetoothDevice

// you should implement the method getBlutoothDevice BluetoothDevice device = getBluetoothDevice(); BluetoothSocket socket = device.createRfcommSocketToServiceRecord(MY_UUID_SECURE); 

Источник

Bluetooth audio streaming between android devices

I made a research on the same topic and found that android devices are a2dp sources and the audio can be streamed only from an a2dp source to an a2dp sink. A2dp sink can be a bluetooth headset or a bluetooth speaker. But my question is then how the android app named «Bluetooth Music Player» works? It allows streaming from one mobile to another. So in this case the listening mobile device must act as a sink. How this is possible? Are they using some other profile instead of a2dp? Ok, that may be a different profile what they are using. Because the application needs to be installed in the client side also. But how it becomes possible to stream voice from a bluetooth microphone to an android device? Please help.

I did not understand what you need to know: sending audio from one Android to another, or sending audio from a standalone Bluetooth microphone to an Android?

Hello Sir, I need your help to steaming audio from one device to another device. Can you please give me any example code for this ? I have asked question : stackoverflow.com/questions/16789394/…

1 Answer 1

Without knowing details about the mentioned Bluetooth Music Player, it seems to use simple Bluetooth data connection, otherwise you would not need to install a client on playing/sending device.

To stream audio from microphone to another device, you can record it on your sending device and send it to the receiving device. You will need to implement a protocol for that purpose.
OR
You can implement an alternative A2DP sink service. This is, what the sink is: a device with a Bluetooth Protocol Stack with an implementation of A2DP Sink.

Edit:
For the case you detailed by your comments, the sending device should be left as-is, without installing any app. That implicitly means that your solution must make use of out-of-the-box Bluetooth functionality of that Android device.
What you can use here is therefor limited to those profiles that Android typically support, which is HSP, HFP and A2DP. Since you obviously want to stream music, A2DP would be your choice.
On the device supposed to receive the audio stream and do the playback, you have to implement a service providing the A2DP sink as an self implemented BluetoothService opening a BluetoothServerSocket on RFCOMM as described in Android documentation.

Читайте также:  Korg bluetooth midi connect

You will have to spend much effort implementing this, and I am not sure if you will need a license for this.

Источник

How to stream audio from PC to Android Device over Bluetooth

I have a rooted Android Device running Android 2.3 Gingerbread and a PC(with Bluetooth dongle) running windows 7. My mobile has Bluetooth with A2DP support. I want to output the audio(not just music) of my PC to my Android Device over Bluetooth. i.e. I want my android device to work as an Audio Output Device(like headset) for my PC. How to do it?

10 Answers 10

Dev0 and hello are correct — no you cannot connect using your Android device as a A2DP sink given the standard Android bluetooth stack. Stack Overflow user Dennis Mathews explains why:

You may not be able to [create an A2DP connection] manually between 2 phones also because to stream one device needs to be A2DP sink and other other A2DP source; phones are typically only source devices (source of the stream that can stream to sink devices), sinks are headsets or Bluetooth speakers.

He and the OP briefly discuss options for replacing the stack but their conversation dies without a concrete answer. as it seems several other similar questions around the web do. XDA user zelendel, in general, isn’t very hopeful about the matter — when asked if it was possible to replace the bluetooth stack he responded:

Simple answer is no. You can try a CM based rom that gives you those options but the stacks can’t be swapped due to driver problems. It is a give and take. The Default has better strength and range but is missing a few unneeded option (PO), while CM uses Bluz stack which gives you the option but you lose some BT signal strength and range.

Sorry, it seems to me you’re out of luck.

Источник

How to Stream PC Audio to Android via WiFi or USB

Stream Audio from PC to Android via wifi or usb

Do you want to play your favorite music from your PC on your Android device without transferring the files? This is now possible with the help of the casting tools and methods listed in this article. So now you can play any audio anywhere at home as long as you’re connected to Wi-Fi. Check out the best tools to stream audio from PC to Android below.

Top 3 Ways to Stream Audio from PC to Android

Stream PC Screen and audio PC sur Android via ApowerMirror

Stream PC audio to Android device using apowermirror

If you are looking for the best tool to stream PC audio to Android device, ApowerMirror is the top choice. This amazing tool can help you cast not just your audio but as well as your screen from your PC to your Android phone. It offers clear-quality audio casting without delays. Moreover, it also has a friendly -user interface that makes it easier and more feasible to use. Here are the steps that you need to follow and use.

  • Download Apowermirror and install it on your PC and Android phone. Download
  • Connect your PC and Android phone to the same Wi-Fi.Stream PC audio to Android device via same wifi
  • Run the app, and on your phone, tap the Mirror button > Mirror PC to Phone then the mirroring will begin.Stream Audio from PC to Android using apowermirror
  • Play your favorite music to listen to it on your Android phone.
Читайте также:  Bluetooth connected no phone android

Stream music from PC to android

Cast audio from the computer to Android with stream music

For a faster connection, you can use the direct process if your PC supports Bluetooth. If your PC doesn’t support Bluetooth, just install the drivers needed or update your driver with Windows Update from your computer’s settings. Once your computer’s Bluetooth is ready, you can cast audio from the computer to Android by just following the procedures listed below.

  • Click the Windows icon then proceed to the Settings.Stream PC audio to Android device via stream music
  • Go to Devices > Bluetooth and other Devices”. Click “Add bluetooth or other device” then choose your Android phone to connect.Cast audio from the computer to Android by adding bluetooth device
  • You can now play audio from your PC to your Android phone.

Cast audio from the computer to Android Using Soundwire

Mirror Audio PC to Android device

One more way to mirror Audio PC to Android device is by using the Soundwire server. The Soundwire server for Windows is a program that lets you make your Android phone as an external speaker of your computer. You can cast and play any audio and music from PC to your Android phone wirelessly. Check the following steps if you want to use Soundwire to cast audio from PC to Android phone.

  • Install Soundwire on your PC and Android then connect both devices to the same Wi-Fi server.Stream Audio from PC to Android using soundwire
  • Open the app on your PC then copy the Server Address and paste it to your Soundwire app on your Android phone.Stream PC audio to Android device using soundwire
  • Your Android phone is now an external spreaker of your PC. You can now play music from your PC to your Android phone.

Conclusion

These are the top 3 easiest methods to display and cast your audio from your PC to your Android device. Each one has its own advantages, so choose whichever one best suits your needs. But if you want to cast not just your audio, but your computer’s screen to your Android phone as well, ApowerMirror is the best tool for you.

Источник

Оцените статью
Adblock
detector