I am very familiar with using the shouldOverrideUrlLoading method in Android WebView and have used it in a few projects. I have a new project that requires Mozilla's GeckoView instead of the standard WebView, but I can't seem to find a method to override urls (to prevent a user from following certain links off of the initially-loaded website). Does any method like that exist?
I've embedded GeckoView into my project with these instructions: https://wiki.mozilla.org/Mobile/GeckoView and the websites render great.
The Android WebView code I'm trying to emulate looks like this:
browser.setWebViewClient(new WebViewClient() {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
Uri uri = Uri.parse(url);
if (url.startsWith("https://www.example.com/")) {
return false;
}
return true;
}
});
Is there any similar method in GeckoView?