I decided to play around with Android Studio and its WebView. On a certain url I have a Live View phoenix app (all working as expected), let’s say example.com. Configurating the WebView, I pass the url
mywebView.loadUrl("https://example.com/");
which works well, the site is opening successfully. However, it seems that Live View does not work. I remember I had a similar not working LV when being behind nginx proxy, where
did the trick. However, I have no idea what to do in the Studio. The question is not fully connected to the Elixir topic, I know, however every through would be highly appreciated. Thank you.
Check webview settings, by default it disables a lot of settings like possibility to run JS. There is also the fact that webview(just like browsers) block mixed content, so ensure that everything is under http or https.
After some trial and error, I found that using a GeckoView has several advantages over a Webview, one of which is that state can be preserved when navigating to a different App, Activity or Fragment. One of the bigger downsides is a bigger APK size, due to LibXUL weighing in at about 68 MB…