My app is a WebView Application and I've setup URL Intent Filters so when a link with the domain "riftacademy.org" is clicked, it opens my app.
Now I'm trying to implement deep-linking into the WebView application...
I saw something similar in the thread here How to enable deep-linking in WebView on Android app?
But unlike the above which uses a custom URI Scheme to open the application, I'd like to implement deep-linking in my WebView using my domain name "riftacademy.org"
In this scenario, when a link such as https://riftacademy.org/login or https://riftacademy.org/register is clicked, it should open the app and go to the pages that match the links. But in this case, it opens the app but only loads the homepage riftacademy.org...
I want the WebView app to be able to load links after the app has been opened, similar to how YouTube and Facebook handle links
Can Deep-Linking be achieved in WebView using Domain Names?
A snippet of where I'm guessing may be needed to edit
newWebView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW);
browserIntent.setData(Uri.parse(url));
startActivity(browserIntent);
return true;
}
});
return true;
}
});
Thanks in advance