← Back to Frequently Asked Questions

Can I use rtcStats for native mobile apps?

Using rtcStats with iOS, Android, React Native, and Flutter WebRTC applications.

rtcstats.js is a JavaScript SDK designed for browser-based WebRTC applications. Native mobile apps require a different approach.

The challenge

Native iOS and Android WebRTC implementations (using Google's native libWebRTC implementation) don't run JavaScript in the browser, so rtcstats.js can't be used directly.

However, the underlying concept is the same - these native libraries also expose a getStats() API that returns similar metrics.

Current options

Build a custom collector

For native apps, you can build a lightweight collector that:

  1. Periodically calls getStats() on the native WebRTC peer connection
  2. Formats the results in the rtcstats JSON format
  3. Sends them to your rtcstats-server

If this is something you want to discuss and have us implement as a custom project, contact us.

Third party mobile native SDKs

If you are using a third party mobile native SDK, then access to getStats() and other APIs might be limited or nonexistent. For example, Amazon Chime SDK does not expose getStats() at all via the native mobile SDKs it offers.

To see if there is even a potential to have metrics collected, check the SDK you are using for the relevant APIs.

Skip

Your application today is likely not collecting and analyzing WebRTC metrics - otherwise you wouldn't be reading these pages.

It would be preferable to start somewhere and have your web-based applications monitored with rtcstats-js than nothing at all.

What's on our roadmap?

We do plan to support native mobile SDKs. Such support will only be offered via the paid plans.

If you want to learn more about these, contact us.

See also

Was this page helpful?