The application works fine in a regular browser, even on mobile phones.
I am now trying to "wrap" the web-app in a Xamarin WebView, so that I can deploy it as a mobile app.
I'm focusing on trying to get it to work on Android first, then deal with iPhone later.
Therefore, it doesn't really matter if I get this to work with Xamarin.Forms or Xamarin.Android. As long as it works, I'm happy.
When this happens in a regular browser, you get prompted with a question that asks if you allow the app to get your current position. You presss "allow" and the app continues.
This doesn't happen when the the app wrapped in a WebView.
I've created a simple webpage that uses the navigator.geolocation.getCurrentPosition method and just displays lat & lng inside a h1 tag on the page.
Here is the page: httpsjakethesnake .se
If I'm able to get that page to work in a WebView, hopefully my real app with google maps will work too.
I've read a couple of stackoverflow threads and other posts about this. Most of the solutions there are obsolete or works sometimes and sometimes not.
Thankful for any help.