VoIP Resources VoIP Fundamentals WebRTC Essentials

Android and WebRTC

by OnSIP

Learn about WebRTC on Android.

One of the most exciting prospects for WebRTC adoption continues to be the mobile market. WebRTC on Android has already made serious headway into this field. As of now, WebRTC is supported by the Android versions of Chrome, Firefox and Opera. Together, these browsers currently account for more than 31% of all mobile browser usage today. Safari alone accounts for 40%. This is why Apple’s support for WebRTC is being sought, even though they are a fairly minor consideration when it comes to desktop browsers.

The figure seems to be at odds with Stat Counter’s conservative estimate that 64.78% of all browsers worldwide are WebRTC-enabled, but the figures make more sense when one considers that mobile browsers only make up 26.64% of worldwide browser usage. Regardless of these statistics, the initial efforts by Google and Mozilla show that WebRTC on Android can and will pave the way for broader adoption on mobile devices.

WebRTC in Android Apps

In terms of native support, Android applications can be packaged with the WebRTC core before being compiled up and added to the app store. This gives developers an opportunity to utilize the benefits of WebRTC in applications outside of browsers. WebRTC for Android enables the ability to communicate via the internet through streaming video, audio, and text without requiring plug-ins.

How WebRTC for Android Works

The basic implementation of WebRTC for Android is very similar to desktop browser versions. getUserMedia, RTCPeerConnection, and RTCDataChannel are the three APIs that form the core architecture of WebRTC for Android. Media is encoded and synchronized by getUserMedia. This data is then transmitted in an offer/answer model via a signaling mechanism (such as OnSIP's platform) through RTCPeerConnection. Arbitrary data (text chat, file sharing, etc.) is enabled with RTCDataChannel. Taken together, these APIs are capable of transmitting almost any conceivable form of real-time data.

The most crucial component for WebRTC on Android besides a supported browser is the server-side signaling mechanism that enables peers (i.e. browsers) to connect, despite barriers that can lead to lost or misdirected data. The solution often comes in the form of a pre-existing signaling platform, such as OnSIP's. Our mature, scalable SIP signaling platform is primed to traverse the complexities of NAT and firewall based impediments that obstruct clear communication between peers.

Learn more about VoIP Fundamentals