Android Question Audio Streaming and Server With PHP

Marcos Alves

Well-Known Member
Licensed User
Longtime User
Anybody knows how to use audio functions/library to communicate with other android device using streaming and a server? I know that there is a "walkie talkie" (this tutorial by Erel -> https://www.b4x.com/android/forum/t...reaming-over-wifi-or-bluetooth.30648/#content) - but it's very difficult or even impossible in some networks to create a direct socket with other peer thru internet. A server solution using, for example, php streaming between two android devices could be the ideal solution always, with the bonus of gaining control and visibility over the peers - the basis of a professional communications service... does anybody knows how to do this ? (streaming client/library + php streaming server ?). Thanks!
 

Marcos Alves

Well-Known Member
Licensed User
Longtime User
Ok, thanks @Erel . I never used B4J but I think that came from you must to be a great tool like b4A and B4i... following your opinion: do you have any sample in B4J of a streaming server... something like: client A - connect server - server has the client B IP also... then, receive streaming from A to B and back from B to A. I know that maybe the best place to put this thread could be B4J forum, but this will be also a tool for Android clients...
by the way, happy new year and thanks for all these great frameworks!
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
There is no such example. This task is less suitable for a server based on jServer. You will need to implement it with sockets and AsyncStreams.
Start with this example: https://www.b4x.com/android/forum/threads/72149/#content

Assuming that you only need to support exactly two clients then you can simplify the solution by listening on two ports with two ServerSockets and then transfer the data between the AsyncStreams (after they are connected).
 
Upvote 0
Top