How can I get user's location on Android/iOS webview?

I’m trying to get user’s location using javascript and it worked for me on the browsers but having difficulty on Android/iOS WebView.

I get a prompt on the browsers to allow my location but I don’t get such similar prompt on Android/iOS WebView based apps when running the same code mentioned below. Javascript is enabled in the applications fyi.

Here is what I have:

I’m using C# as my backend language if that can help me out.
I’ve got no problem to use any other approach as well. Any suggestions will also be appreciated. Thanks.