When implementing a WebView the service provider Plaid uses urls that have custom protocols. We use the Navigating event to evaluate where the customer is in the registration process. This was working and still works on iOS, but now on Android we are receiving net:ERR_UNKNOWN_URL_SCHEME when Plaid sends these links.
We need to be able to receive the Navigating event without the webview throwing an error. We know that this was once working
Plaid uses custom protocols to invoke callbacks to the application. On iOS and previously on Android these were and should be ignored and not navigated to. Here are he three links that we receive.
plaidlink://acknowledged?
plaidlink://exit
plaidlink://connected
We get the navigating event and parse these url.
The error we receive now is net:ERR_UNKNOWN_URL_SCHEME
Here is the code snippet we are using.
var publickey = "********";
var webhook = "https://hipmoney.hippocket.net/plaidbankaccounts/webhook";
var url = "https://cdn.plaid.com/link/v2/stable/link.html?isWebview=true&key=" + publickey + "&env=production&product=connect&selectAccount=true&webhook=" + webhook + "&clientName=hipmoney";
if (!String.IsNullOrEmpty(PlaidProvider.PublicToken))
{
url = "https://cdn.plaid.com/link/v2/stable/link.html?isWebview=true&key=" + publickey + "&env=production&product=connect&webhook=" + webhook + "&clientName=hipmoney" + "&token=" + PlaidProvider.PublicToken;
}
plaidView = new WebView
{
Source = new UrlWebViewSource
{
Url = url
},
VerticalOptions = LayoutOptions.FillAndExpand,
};
this.Content = plaidView;
plaidView.Navigating += (sender, e) =>
{
JObject plaidParams = ParseQueryString(e.Url);
Debug.log(DateTime.UtcNow + " Navigating " + e.Url);
if ((string)plaidParams["uri"] == "plaidlink://connected")
{
Debug.log(DateTime.UtcNow + " SUCCESS " + e.Url);
OnSuccess.Execute(plaidParams);
}
else if((string) plaidParams["uri"] == "plaidlink://exit") {
Debug.log(DateTime.UtcNow + " ERROR "+ e.Url);
OnError.Execute(plaidParams);
}
};
We don't know what changed, if there was a configuration within the project or a library that was once included but this no longer works on Android, or if it was working by pure chance but we are 100% confident this was working on release sent out 4 weeks ago.