Streaming content to bluetooth speaker without pairing - android

I have a bluetooth Speaker which requires me to pair and then I am able to play music on it. Is it possible to play music on it without pairing when it is idle(when it is not paired with any device) or pairing with multiple bluetooth speakers/devices at once. I want to create an Android app for that if its possible. I was unable to find any useful information on this so far.
Thanks!

I don't think this is (or should be) possible. Bluetooth uses end-to-end encryption, which is partly negotiated during the pairing phase. If you ignore the pairing phase, this encryption would not be possible (or be completely insecure) and violate the bluetooth protocol.

Related

Android bluetooth app to connect phone to smart speaker full-duplex?

I'm wondering if anyone knows of an app that will allow an android phone to connect to a smart speaker (like Sonos One) via bluetooth, and have the two devices function like an intercom with full-duplex (2-way) audio. There is an app called Intercom on the Play Store, but it will only connect to another phone, not a smart speaker. There are walkie-talkie apps, but these also connect two phones (and require push-to-talk).
Only the Sonos Move has proper Bluetooth support, and only a few audio profiles. You need to use WiFi, and even then you have no access to the microphone on the Sonos.
Thanks for all the come-backs. If anyone trying to solve this same problem runs across this thread, try searching Amazon for "full duplex wireless intercom." I found eMACROS Portable Wireless Intercom System on there. Sound isn't as good as a Sonos or Echo, but it works.

Switch model from BLE to Bluetooth Classic in Android

I'm setting up a mobile application to support bluetooth communication between an android phone and one dual-mode bluetooth module. Two devices must init a BLE connection and transfer sound through HandsFree profile. At any time, two device must be able to re-establish these communications.
Should application shut down the Classic bluetooth process after sound transferring is done and always connect by BLE??
If I understood your question correctly, you don't need Bluetooth Low Energy (BLE) for your application. If you just want to transfer sound through the HandsFree profile, then this can be accomplished with classic Bluetooth alone and you can even turn BLE for the entirety of the application.
Please see this Android Developer page which gives a step-by-step guide on how to do this and provide sample code:-
https://developer.android.com/guide/topics/connectivity/bluetooth#Profiles
Finally, please note that for the most part BLE and classic Bluetooth are mutually exclusive; even though they are part of the same specification, they are like two different wireless technologies and in almost all cases your application will need one or the other, but not both. Please see this post for more details:-
Can a Bluetooth LE powered device discover a classic Bluetooth device and vice-versa?
I hope this helps.

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.
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.
You will have to spend much effort implementing this, and I am not sure if you will need a license for this.

Voice Chat over Bluetooth in Android

I have done some research on Voice Chat using Bluetooth and have gone through the Bluetooth article here http://developer.android.com/guide/topics/connectivity/bluetooth.html but couldn't found anything related to Voice Chat.
I have seen an application on Play Store (https://play.google.com/store/apps/details?id=com.okean.btcom) providing same functionality that means Voice Chat is possible using Bluetooth in Android.
I have also seen Session Initiation Protocol (SIP) provides Voice Chat Service but it uses Internet data. I want it over Bluetooth.
Any help would be appreciated.
On a motorcycle or loud boat a headset would provide clear communications within Bluetooth range. Yelling is impractical and stressful.
Motorcycle comm systems often use BT, but the systems are designed to work on helmets and are propietary. There are instances in a high noise environment where a BT headset or earpiece would be more practical.
An app on a phone or some sort of Bluetooth hub could work in high noise confined environment.
If you are in bluetooth range, why not just voice chat over air? as in sound pressure, aka human speech?

How to make an Android phone as bluetooth headset

I have 2 Android Phones, and I want to connect them together via bluetooth, and make one of them a bluetooth headset.
So, my question is how to program the second phone to change its role profile to "Bluetooth Headset" when establishing the connection ?
I've found this post but my question is a little bit different
Thank for any advice or idea :)
You cannot on Android. At least using the built-in Bluetooth A2DP profile.
Your phone will only act as a transmitter (source), not a receiver (sink).
Please look at these two answers I gave on why this is not possible :
Is it possible to send/receive voice from PC to Android device over Bluetooth
Receive audio via Bluetooth in Android
You can, on the other hand, develop two apps each acting as a client/server using your own protocol. The server could be streaming audio content to the client via Bluetooth for instance.
Another way to consider this, since using an Android device as an A2DP sink is not feasible on every phone, is building these two apps using your wifi connection. It could be much more rapid and the sound sound be of a much better quality.

Categories

Resources