java - Android App to App Calling Best Options -


good day. without further ado want describe situation.

i have built social network app android , it's time voice calling function come in.

i have done lots of researches audio calling done within libraries prepared, have managed social network messaging sockets switched point of view self-driven audio calling mechanism.

the achievement have reached :

• have managed audio calling via socket.io have of concerns , describe them little later.

here how have implemented socket audio communiaction between 2 devices.

1 - have registered 2 devices onto socket server.

2 - using audiorecord class capture user voice.

3 - after voice captured, compressing data of deflater , sending each byte of captured data through socket receiver.

4 - receiver package , decompression after receiver passing received byte array audiotrack class plays audio data in byte array.

notes : recording sample rate 44100. server google compute engine. tested devices - samsung s7 edge , samsung s4.

the issue had : there starting huge delays after period of time,lets 20 seconds later , during debugging can reckon delay due huge amount of server load sending audio data inside while loop each voice byte data.

so can reckon mechanism not 1 must used.

at end of research encounter of best practice saying better use peer-to-peer communication best option both : audio , video calling, saying idea open connection between 2 devices , let them send/receive data without touching server there no huge delays,neither server load.

my primary question next :

what best practice android device-to-device or peer-to-peer connection through can send audio byte data?

if can suggest better mechanism,can share you'r idea of working practice?

thank you.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -