What is the current status, can you make an Android webView (not browser/Chrome Custom Tabs) interpret a link with a custom url scheme like "bankid:///?autostarttoken=xxxx-xxxxc&redirect=https://..."
Here the expected behavior is that the BankID-app should open when loading the link - Getting "err_unknown_url_scheme" instead. Is there any workaround for this? Or is the only way to use Intent?
Tried using Intent as below, which works, but then having troubles with the redirect parameter url, which would open up the browser which is not wanted. Replaced it with app id/null to stay in the webView/app, but then not getting the expected callback url in the webView.
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
String url = request.getUrl().toString();
if(!url.startsWith("http") && !url.startsWith("https")) {
Uri newUri = replaceUriParameter(Uri.parse(url),
"redirect", BuildConfig.APPLICATION_ID);
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(newUri);
startActivityForResult(intent, START_ACTIVITY_FOR_RESULT_LOGIN);
view.reload();
return true;
}
}