I am trying to build a simple chat application. But it requires Voice calls functionality to other users. I would be using Firebase for messaging. Does Firebase have Voice calls support? I can configure external SIP
Asked
Active
Viewed 2.1k times
8
-
1There is nothing built in to Firebase for supporting voice calls. – Frank van Puffelen Dec 20 '16 at 15:21
-
Hello Vikas. Did you implement voice calling functionality? Could you please help me on how to get started? – Arjun Feb 22 '21 at 04:15
2 Answers
12
If you want to create voice call or video call app, maybe you can use WebRTC technology.
WebRTC is a free, open project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs.
There is a nice presentation here

Faruk
- 5,438
- 3
- 30
- 46
-
WebRTC is not suitable for large peer count (e.g. for 25 peers chat, 300 connections are required to connect each two peers of other) – FindOutIslamNow May 12 '18 at 03:50
-
@FindOutIslamNow: Use webRTC with any sip server it will handle large number of rush – Hardik1344 Mar 06 '20 at 04:53
0
Java/Kotlin solution
If you want to create voice calling system using firebase,
Sending
Use AudioRecord
class for getting audiosample
then use Base64.encoder
to convert audioSample(byte[])
to String. Now you can send the converted string to Database.
Receiving
Initiate AudioTrack
get the String from database, use Base64.decoder
to convert String to byte[]
, now you can write the byte[]
to Audiotrack
for playback.

Mises
- 4,251
- 2
- 19
- 32
-
-
I don't know, Webrtc available for java or not, and the performance of my technique and webrtc are same, why do we add extra libs and material if we can create on own. – Helium Cloud Gaming Mar 08 '23 at 04:14
-
Why you didn't explicit that it is Java technology in your answer? Please edit your answer and explicit that this is a Java solution. – Mises Mar 08 '23 at 05:37
-
Never mind, I edited it, please check are it is OK. You can edit your answer and check how markdown works. For example, if you want to make a new line, you need to press twice enter. – Mises Mar 08 '23 at 05:46