Doing the above still didn't work for me, but adding some additional code did - see Android Webview Geolocation
I added the following to my webview object
// enable geolocationEnabled
webview.getSettings().setGeolocationEnabled(true);
// enable JavaScriptCanOpenWindowsAutomatically, not sure if this is needed
webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
// set setWebChromeClient
webview.setWebChromeClient(new WebChromeClient() {
public void onGeolocationPermissionsShowPrompt(String origin, android.webkit.GeolocationPermissions.Callback callback) {
callback.invoke(origin, true, false);
}
});
For some reason android.webkit.GeolocationPermissions.Callback
had to be a fully qualify className, after adding it as an import it was still not recognized by the Eclipse IDE.