In the last topic of the month published on the Upperside blog we discussed WebRTC as a Web App, Native App or Anything In-Between. This post started a live discussion about the need for custom URL scheme in WebRTC native apps.
Following this discussion I had with Aswath Rao I decided to invite him to publish a guest post here where he can provide more details about the idea and explain why he believes custom URL scheme for WebRTC mobile native apps have great value.
The scenario described in this post talks about using a partnering native app that handles the RTC functionality on behalf of the other app. I invite the readers to comment on this, do the readers view this method as a potential alternative to using a PaaS with much easier integration and no real vendor lock but less control (minimal if at all) over look and feel?
Read Aswath’s guest post and provide your point of view on this in the comments section.
In the last topic of the month a few WebRTC “activists” expressed the need for native apps along with WebRTC web apps. Some of the reasons are:
- iOS lacks support for WebRTC in the native browser.
- Native apps provide a mechanism to provide notifications
- Native apps are what users mainly use on mobile
Some of the observations also lead to the requirement raised in this post:
- Some native apps would like to add RTC capability. (Dean)
- Developing native app will require familiarity with that platform. (Chad)
- It is not easy to add RTC capability in native apps as it is to add to web apps. (Schumann)
These observations hint at a specific benefit of web app that is missing from many of the native apps. The objective of this post is to bring out this gap and how the native apps can fill this gap simply. I hope all native apps that aim to provide RTC capability take this step.
Biggest benefit of WebRTC
Though it is not widely and explicitly called out, the biggest benefit of WebRTC is that any website can let its visitors invoke RTC function with a simple click on a “Call Us URL”. The app server required for this need not be part of the same website; it can be hosted by a third party.
Replicating “click to invoke” function in native apps
Given the rationale for the need for native apps in certain platforms and the benefits of using “Call Us URL”, it is imperative that we ensure that native apps have similar capability. Fortunately both the iOS and Android platforms allow something called Custom URL scheme. With such a scheme, browsers and other native apps can exchange data and invoke functions in the WebRTC native app. This way, a website or a native app that wants to provide RTC capability can partner with a native app and can dynamically generate appropriate link using HTTP or custom URL scheme.
So consider the case Dean describes in the original post: “A taxi firm wanting to add a “speak to the driver” button isn’t going to re-write its entire existing native app as a webapp, just to enable feature #37”. With custom URLs they don’t have to. The app has to place a link in the app UI that points to the Custom URL scheme of the partnering app provider with the driver’s id as a parameter. Alternatively, if the interaction happened to be on the firm’s web page, the link will use HTTP form instead of the partnering app’s Custom URL scheme. If the taxi firm does not have its own native app, but its customers use browsers both in a PC as well as mobile devices, then the website can create this link using HTTP or Custom URL scheme depending on the browser’s user agent. WebRTC native apps can make this process simple by keeping the parameter structure the same for both the schemes. This will also address Schumann’s concern as well. With a simple linking mechanism, RTC functionality can be easily outsourced. Since the link can be changed without much difficulty, RTC provider can be changed without much difficulty.
Previously some of the RTC apps have used this approach. For example, Cisco Jabber has a scheme named ciscojabber and the invoking end-point can use the call parameter to identify the destination entity. Skype used to have a Custom URL scheme, but apparently they have removed this capability, to much consternation from the user community. A quick review of some of the WebRTC-specific apps have not defined a Custom URL scheme.
A native RTC app should have a Custom URL scheme that closely resembles its web equivalent.
About the author Aswath Rao :
Backed by more than 30 years of telco experience, bootstrapped EnThinnai. He blogs at blog.enthinnai.com and active on
Twitter (@aswath). The first product (which is undergoing technical review) is a self-hosted, WebRTC-based messaging system. Details at http://ffonio.enthinnai.com/.