pchab / AndroidRTC

Android client for ProjectRTC - a WebRTC demo
Other
1.58k stars 570 forks source link

Android to Android Audio-Video calls #63

Open avpatankar opened 8 years ago

avpatankar commented 8 years ago

Hello,

I am using the latest ProjectRTC from https://github.com/pchab/ProjectRTC.git

I installed and started ProjectRTC (npm install and npm start) and tested on local brwoser to see that its working fine. Then I changed the IP address in the AndroidClient to the ProjectRTC server and ran the application on device 1. Where it poped up the settings "Call Someone: " - This link I shared on the other Android device 2. When I opened the link using Chrome browser on Android device 2 it showed me the video streaming on Android device 2. But it is not showing the streaming from Android device 1. (Even After Refresh button) Both Android device 1 and 2 are connected to the same WiFi point (LAN) (Though the server is on internet)

Please let me know if I am missing any settings and why am I not able to see the video on device 2. Also how can I view the device 2 stream in my app instead of a browser.

Thank you very much

abdulradcliffe commented 8 years ago

If you want to be able to stream within the app rather than browser. then

avpatankar commented 8 years ago

Yup, I found that. In fact now I am able to make calls, pass data without the need to pass links. But what is troubling me is to have a audio video call on mobile data. It is just not working. I can see the setOptions function but it is not effective even if I set it to use cellular data.

Any idea on that please?

abdulradcliffe commented 8 years ago

Sorry. i'm trying to do audio call (not video). and no idea where to start. can you tell me if you've done?

avpatankar commented 8 years ago

In the RtcActivity choose\add only Audio stream in localms array. No need to add video stream. Rest should be unchanged. You will be shown blank screen on GLview\surface view but you can easily show your on view through main.XML layout changes.

NikhilBhutani commented 8 years ago

can any of you tell me how to implement this in android studio, I have successfully imported and compiled the project using android studio on windows 8. But I can only see the black screen on emulator as well on an android device. The application is running, no crashes.. But nothing is getting displayed. Any help would be appreciated. :)

avpatankar commented 8 years ago

Where is the server (Project RTC) running? LAN or over internet? Check the ip address is correctly set for your server in values xml.

NikhilBhutani commented 8 years ago

I'm sorry I have got no idea about ProjectRTC using as server? Can please guide me about it. Thanks

avpatankar commented 8 years ago

To get this application working you need a server-side which will do the signaling job. If you don't want to develope yourself you can install the node.js server with its desktop client from the same project (just follow How To instructions from AndroidRTC and the Install instructions from ProjectRTC):

https://github.com/pchab/ProjectRTC

Hope it helps.

NikhilBhutani commented 8 years ago

okay,thank you :) I may connect with you for further issues.

NikhilBhutani commented 8 years ago

@avpatankar Hi, I'm able to run ProjectRTC on my local machine, and I'm on my wifi network, I edited the host address on android app as my ip address, and then tried various other things too. Android app is still showing the blank black screen. While local:3000 is running smoothly between the browsers. Can you please let me know how to further config android app to get it running including the complete communication.

avpatankar commented 8 years ago

Is the Android app correctly connected to your wifi network- I assume its a wifi hotspot? Check by doing some "googling" in your android phone? Just ensure your server is accessible from your android. (Try pinging server)

Local host will always work.

NikhilBhutani commented 8 years ago

@avpatankar Yes, it is working now, thanks :)

Bala206 commented 8 years ago

1) When you start AndroidRTC app on device-1 then it will show a popup. Call someone Share the link from device-1 to device-2 (via email, whatsapp sms etc) in device-2 you will get that link click that link Android will let you choose from different apps (like chrome, browser and AndroidRTC) choose AndroidRTC. Now Device-1 App Crashed ?

2) And Also Browser shows device-list.In list View button shows device video streaming correctly. When click on Call button device side App crash?

Can any one know answer help me how to fix it?

abdulradcliffe commented 8 years ago

@Bala206 Please see your logcat of device-1. so that you can know why it is crashing

Bala206 commented 8 years ago

@abdulradcliffe it shows onAddRemoteStream() indexoutofBoundsError in linked list (181)

Bala206 commented 8 years ago

@abdulradcliffe 01-05 12:47:06.214 32609-32632/fr.pchab.androidrtc W/System.err: java.lang.IndexOutOfBoundsException 01-05 12:47:06.219 32609-32632/fr.pchab.androidrtc W/System.err: at java.util.LinkedList.get(LinkedList.java:519) 01-05 12:47:06.219 32609-32632/fr.pchab.androidrtc W/System.err: at fr.pchab.androidrtc.RtcActivity.onAddRemoteStream(RtcActivity.java:190) 01-05 12:47:06.219 32609-32632/fr.pchab.androidrtc W/System.err: at fr.pchab.webrtcclient.WebRtcClient$Peer.onAddStream(WebRtcClient.java:241) 01-05 12:47:06.219 32609-32632/fr.pchab.androidrtc W/System.err: at dalvik.system.NativeStart.run(Native Method) 01-05 12:47:06.219 32609-32632/fr.pchab.androidrtc W/System.err: at dalvik.system.NativeStart.run(Native Method)

App crashed and screen shows "Connecting" Toast. How to fix pls give ur ideas..///

Karthikg206 commented 8 years ago

Could not find method android.opengl.EGL14.eglGetCurrentContext, referenced from method org.webrtc.VideoRendererGui.onSurfaceCreated in android tablet api 16 how to solve

borhanreo commented 7 years ago

@Bala206 you have to Change your peer name in RtcActivity. java here client.start("android_test"); like as client.start("device_1"); every device should be different peer name