0

How can I achieve that eg. the following HTML code displays an image in a Maui webview in the Android emulation?

<!DOCTYPE html><HTML>
<BODY>
<H1>.NET MAUI</H1>
<P>Welcome to Yahoo.</P>
<img src="https://s.yimg.com/rz/p/yahoo_homepage_en-US_s_f_p_bestfit_homepage.png" alt="Yahoo Image">
</BODY>
</HTML>

Are there any settings to be made to the webview?

Rolf
  • 191
  • 1
  • 4
  • 13
  • Have you tried this? Are you having a problem? – Jason Dec 21 '22 at 14:55
  • The image is not displayed. – Rolf Dec 21 '22 at 15:57
  • Sorry for my posting. The problem in my specific case was using "http". I should have used "https". That's why the Yahoo example works. – Rolf Dec 21 '22 at 16:09
  • there are numerous existing questions that discuss Android restrictions on non-https requests – Jason Dec 21 '22 at 16:41
  • I tested the code you provided, and it works well. You said that your specific case was using "http". Could you provide the link using "http"? Have you tried to open that link in your browser to see if it works? – Jianwei Sun - MSFT Dec 26 '22 at 03:17
  • In the browser "http" works. In webview only "https". – Rolf Dec 27 '22 at 15:59
  • You can refer to this link about [How to allow all Network connection types HTTP and HTTPS](https://stackoverflow.com/questions/51902629/how-to-allow-all-network-connection-types-http-and-https-in-android-9-pie). It could be helpful to you. – Jianwei Sun - MSFT Dec 28 '22 at 06:40

0 Answers0