I’ve creating a flutter android application that has a webview. Within this webview, I have a site with a link to an external app. I have the link working and the external app is opening nicely, but when I go back to my flutter app the webview is blank. I have tried a few things such as preventing navigation when the app is being opened. I have also tried injecting javascript to see if that would work. No luck.
I have opened the app outside of the webview (in the app/not webview) and I’m getting the same result.
I decided to open the other app by clicking on the app icon instead of using url_launcher and I’m getting the same result.
I then decided to use Google’s “Adding WebView to your Flutter app” tutorial to create and flutter app with a webview. https://codelabs.developers.google.com/codelabs/flutter-webview
I used this github.com to build the exact app Google created in the tutorial.
https://github.com/flutter/codelabs/blob/main/webview_flutter/step_12/lib/src/menu.dart
I got the same result. When I opened the Google app with a webview and opened another app, then went back to the flutter app the webview stopped working.
Does anyone have any clue what is going on here and how to fix this problem?