.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,418 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
It's an .Net MAUI iOS app. Inside the app, I'm trying to run a web application inside WebView and after I select the image in Photo Library, it is not returns to page, just showing loading icon and doesn't upload the image. Android part work fine.
MainPage.xaml
<WebView Loaded="WebView_Loaded"
x:Name="myWebView">
</WebView>
MainPage.xaml.cs
private void LoadWebView()
{
myWebView.Source = "URL";
}
protected override void OnHandlerChanged()
{
base.OnHandlerChanged();
#if ANDROID
var webview = myWebView.Handler.PlatformView as Android.Webkit.WebView;
webview.SetWebChromeClient(new myApp.Platforms.Android.MyWebChromeClient(MainActivity.Instance));
if (webview is not null)
{
webview.Settings.MediaPlaybackRequiresUserGesture = false;
webview.Settings.SetGeolocationEnabled(true);
webview.Settings.JavaScriptEnabled = true;
}
#endif
}
Not sure what's setting do I need.
Thanks in advance.
You don’t show any code or error messages. Also be sure the web site the webpage loaded from and is uploading to is not having an error.