1

When I tried the demo app https://kevingleason.me/AndroidRTC/, it was working as expected.

But when I tried with two android devices, I can make a call and receive call, but they don't get connected. In both devices, its own camera feed is displayed with a text "Connecting...". I tried on both my home Wifi and mobile data 3G. There is no error that I can find in log.

Could anyone help me to resolve the issue please. What is that I am missing here?

I am using the latest code from https://github.com/GleasonK/AndroidRTC which already has the Xirsys ICE servers configured. But I noticed that the Xirsys ICE servers is not added in the below line from VideoChatActivity.java, so I also tried adding that servers into the PnSignalingParams' constructor, but still facing the same Connecting message only.

List<PeerConnection.IceServer> servers = getXirSysIceServers();    
if (!servers.isEmpty()) {      
   this.pnRTCClient.setSignalParams(new PnSignalingParams(servers));      
}      
Craig Conover
  • 4,710
  • 34
  • 59
solar
  • 31
  • 3
  • @CraigConover - Thanks for your time. Not exactly I guess. I already checked that SO thread, that differs from my case. In my case, after I receive the call in receiver side, both caller and receiver get their own front camera stream is rendered in their own screen along with a text "Connecting...". (not as blank screen as in the other SO thread). Could you please help me. – solar Sep 20 '16 at 03:32
  • @CraigConover - This issue is also listed in one another thread (http://stackoverflow.com/questions/37835110/how-to-use-xirsys-hosting-in-pubnub-android-example), but I couldn't find solution in that thread. – solar Sep 20 '16 at 03:41
  • Are you able to follow the messages being sent through the signalling? Can you see if **offer** and **answer** are being passed? Also, what candidate types (**typ** param in candidate) is the device sending? – LeeSylvester Sep 21 '16 at 09:08
  • @LeeSylvester - I think, this issue is occurred to almost everyone https://github.com/GleasonK/AndroidRTC/issues/3 it seems. Since I have lack of time in this project, I didn't want to spend more on this. Now I am looking for alternative/custom signaling solutions. If I find some time later, I will post my observation you asked. Thanks, though. – solar Sep 22 '16 at 05:17

1 Answers1

1

I have fixed the issue. It was little tricky. If you see the log, it will show you that the application always execute createOffer method. So both client A and client B will send an offer in same time. You can fix that issue by giving some condition so if the client A give an offer, and the client B will response by give an answer.

To see if any error occurs you can use method onCreateFailure(String s) and onSetFailure(String s) in PnPeer.java. Hope this will help.

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
Novianto
  • 11
  • 2