This post is about detecting hyperlink click in a Android webview with C#. This can be useful in two scenarios.
You need to open an activity when user clicks on some hyperlink
You need to do something when user clicks on some hyper link.
You can achieve this by overriding the ShouldOverrideUrlLoading() method of WebViewClient class.
Here is the implementation. In this code, my web application contains a special hyperlink with “home” protocol, if user clicks on the link, I need to show the Main activity, else user need to navigate to the required url.
Happy Programming :)
What do you think? I would like to hear your thoughts, suggestions, and questions in the comments section below.