Badoo Guillermo Orellana Jul 4, 2017

Integrating React Native in an Existing Application

Article Summary

Guillermo Orellana from Bumble's tech team walks through the real-world pain of integrating React Native into an existing Android app. Spoiler: the official docs won't save you.

This 2017 article from Bumble's engineering team documents the actual integration challenges when adding React Native to a mature Android application. Orellana shares the undocumented API issues, permission problems, and build configuration gotchas that blocked progress at every turn.

Key Takeaways

Critical Insight

Integrating React Native into existing Android apps requires solving five critical undocumented issues around native libraries, permissions, Maven configuration, and manifest declarations.

The article hints at an even bigger challenge coming next: handling bidirectional communication between React Native and native Android code.

About This Article

Problem

React Native v0.42.3 didn't have clear documentation for ReactInstanceManager lifecycle methods. Badoo's team had to figure out on their own how to implement onPause, onResume, onDestroy, and onActivityResult callbacks in their custom ReactActivity. Without these, the app would crash and leak memory.

Solution

Guillermo Orellana built a complete Activity implementation that handles ReactInstanceManager lifecycle events properly. The code implements DefaultHardwareBackBtnHandler and routes all Android lifecycle events through the React Native instance manager.

Impact

With proper lifecycle management in place, Badoo could launch a React Native Activity inside their existing native Android app. This proved that hybrid integration was possible, even though the API requirements weren't documented.