I am porting an application from Windows 8 Phone to Windows 8.1 RT, and I have a web service that returns a custom URI that cannot be processed by Windows RT's WebView, but can be handled by Windows 8 Phone's WebBrowser.
It is handled in the Windows 8 Phone app this way:
private string _successUri = "app://transactions/payment/complete";
void webBrowser_Navigating(object sender, NavigatingEventArgs e)
{
var navigatedUri = e.Uri == null ? "" : e.Uri.ToString().ToLower();
if (navigatedUri.StartsWith(_successUri))
{
e.Cancel = true;
App.NavigationService.Navigate(new Uri("/Views/TransactionSuccessPage.xaml?transactionid=" + _transactionId, UriKind.RelativeOrAbsolute));
}
}
From what I understand, Windows 8 Phone's WebBrowser control will allow attempts to navigate to unsupported URIs, considering the implementation given above.
I have attempted to use Windows RT's WebView.NavigationFailed
, but to no avail, as the WebViewNavigationFailedEventHandler
only returns the web service's URI (POST
, if I'm not mistaken), and not the unsupported URI.
My research has pointed me towards WebView.UnsupportedUriSchemeIdentified
, but unfortunately it is only available for Windows 10.
Is there any other way to handle this?
Do note that I do not have access to the WebService
, so any manipulation on that end is out of my reach.