I see a lot of tutorials in the Internet teaching about android to browser or browser to browser webrtc application. Is it possible to build a native android-to-android video chat app using webrtc?
There is an official Android sample project AppRTCMobile provided here - https://webrtc.org/native-code/android/. However, the build process is tedious and the total download size exceeds 20 GB. The recommended way is to use the following dependency in your project. implementation 'org.webrtc:google-webrtc:1.0.+'
However, for video chat functionality you will need to refer AppRTCMobile source code. There is a clone of this project on GitHub updated for Oreo and ready to import in Android Studio. Check out this link.
Well, for establishing a connection between the devices before the call via peer-to-peer WebRTC solution you need STUN/TURN/ICE servers. They establish the route for communication between the devices. Once the route is established the devices communicate directly without participation of a server for passing the media streams.
To make it easier for you, you can look at or try some existing solutions, like ConnectyCube. They have peer-to-peer WebRTC solution for Android already implemented. So, maybe there is not need to reinvent the wheel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With