How to set an option for an Android webview?

Hi,
I’m very new to JUCE so please forgive my ignorance.

When using a WebBrowserComponent class, I guess that the underlying implementation when compiled for Android is a Webview and I’d need to activate the setDomStorage flag (WebSettings  |  API reference  |  Android Developers) for my project.
The issue is that I have no clue how I’m supposed to reach it :smiley:

As a minimal example, I’m just tweaking the WebBrowserDemo

Is there a bit of documentation somewhere about this kind of use cases ? I use JUCE 8.0.7.

Thanks in advance ! :folded_hands:
Best,
Matthieu

Ok, I found this piece of code that seems promising : JUCE/modules/juce_gui_extra/native/java/app/com/rmsl/juce/JuceWebViewClasses.java at 10a589619b452c261b2940767eb253171eb5a823 · juce-framework/JUCE · GitHub

but now I’ve to follow these instructions in order to apply the changes : JUCE/modules/juce_core/native/java/README.txt at master · juce-framework/JUCE · GitHub

wish me luck ! :laughing:

ok, so if anyone needs this, here’s an updated tutorial (using d8 instead of dx), here’s what I did (that seems to work) :

jar --create --file=tmp.jar --manifest=/dev/null -C . .
<path-to-your-android-sdk>/build-tools/<latest-build-tools-version>/d8 --min-api <your-min-sdk-of-your-classes> --output /tmp ./tmp.jar
gzip /tmp/classes.dex
xxd -i /tmp/classes.dex.gz
<copy paste the output in the corresponding .cpp file>
<rename javacore to java>
1 Like