I’m trying to open in expo-sdk-35 html file that loads script file.
In IOS everything works fine as expected like this: <WebView source = { require('./file.html') } />
On the other hand, for Android the above code doesn’t work for me.
I tried: const myHtml= Asset.fromModule(require('./file.html')).uri; <WebView uri= {{uri: myHtml}} />
I tried with loading the html before in a async way : const file = await AssetUtils.resolveAsync(require("./file.html")); const paypalHtml = await FileSystem.readAsStringAsync(file.localUri);
Nothing is working for me.
I saw some comments that said to attach the file to android assests folder.
I don’t know how to that in expo (I tried with expo assests directory).
I would appreciate any help,
Thank you from advance.
It depends on the images/scripts/etc. referenced in the html.
e.g. if the html contains: <img src="images/test.jpg"> where the full URL is actually https://www.example.com/site/images/test.jpg then the base URL is https://www.example.com/site/