We have a React Native app (Expo) and a website. We successfully integrated Intercom widget on a website and now tries to show the same widget inside our RN app.
Since we are using managed RN app by Expo and eject is not an option for us (we don’t want to loose capabilities of Expo) we can’t add and link react-native-intercom library into project.
The simple and logical solution was utilize WebView (react-native-webview) and render widget inside it.
On iOS it works like a charm! The sexy widget appears and can be managed through communication between RN app and WebView using postMessage/onMessage technique.
But on Android I see only white screen. No widget icon appeared. I spent a lot of time struggling with it and googling, no solution.
As an experiment I developed a pure native Android app, created Activity and attached native WebView to it. In Chrome dev tools I started to debug WebView to understand what’s going on. No errors during script running. The first script widget loads fine. Only one thing I’ve found is:
When frame-modern.d209035c.js and vendor-modern.651d8a21.js requests, the WebView prints net::ERR_CONTENT_DECODING_FAILED.
I assume that exactly that error breaks the widget bootstraping and showing.
Maybe someone had the similar problem and found a workaround?