Bluetooth Audio

Philip Prins

Active Member
Licensed User
Longtime User
Hello everyone,

I made a APP for Mercy Ships so they can use there mobile radio's in the cars in Africa to send and receive text messages and send and receive GPS positions.
Now i want to send the micaudio from the phone to the mobile radio, Roman from BTintercom send me the source and a App written in Java/Eclipse to do this.
I need help to use it with B4A, anyone interested/willing to help?
It is for a good charity that helps a lot of people in Africa with medical care.

Regards,
Philip
 

Attachments

  • TextS.png
    TextS.png
    23.9 KB · Views: 703
  • GPS1s.jpg
    GPS1s.jpg
    24 KB · Views: 643
  • RadioS.png
    RadioS.png
    37.4 KB · Views: 669

Philip Prins

Active Member
Licensed User
Longtime User
Hello Erel,

I got the code from Roman Belda from Android Intercom.
Free to use ,
see his reply
Hello,


I think it is much better to try to integrate all in the same app.
What I did is really simple. Take a look at it. It is a Eclipse project. Im sure there will be a way to do it.

--
Román Belda
[email protected]
 
Upvote 0

Philip Prins

Active Member
Licensed User
Longtime User
Hello Erel,

The radio's are Kenwood TK8180 mobile radio's 25 Watt .

If you help me out i will send 2 off them to you , i can programm them for you on license free frequencies 433 MHz .
You can also connect a gps receiver to them, they can send and receive text,GPS.

regards'
Philip
 
Upvote 0

Philip Prins

Active Member
Licensed User
Longtime User
Yes that works for sending commands but for audio i want use AD2P like in the example.

See the attachment made with the Java code.

It sends the audio from smartphone mic to RN52 speaker output.
 

Attachments

  • TalkToA2DP.apk
    202.7 KB · Views: 804
Upvote 0

Philip Prins

Active Member
Licensed User
Longtime User
Pairing works only i want so send the mic audio from the phone to the bluetooth headset,similar to what you do with the streamer library .
Instead of streaming to a IP adress i want to send it to the bluetooth headset/device.
 
Upvote 0

Philip Prins

Active Member
Licensed User
Longtime User
Hello Erel,

I got it to work with the streaming library
B4X:
Sub AudioStream_RecordBuffer (Data() As Byte)
   If sendingAudio Then
      
      'astream.Write(Data) 'disable network stream.
      audioStream.Write(Data)
   End If
End Sub

Instead of streaming to IP i play the recorded audio instant, it is then coming out of the bluetooth audio module or BT headset.
If no headset is connected ot will come out of the speaker of the phone.

So now the internal mic audio of the phone is send to the bluetooth audio module.

The other way around is not possible (to send audio from the bluetooth module to the speakers of the phone)

Hope this will help others if they want to make a public adress app or karaoke app to use the smartphone mic to send audio over bluetooth to remote speakers as a wireless microphone.

I will use it as a remote microphone to a twoway radio......

Regards,
Philip
 
Upvote 0
Top