I developed a web application and I tried to use webview. Everything works fine except the geolocation (which works perfectly in web)
Does anybody have an example of a webview with geolocation?
This is the code for webview:
package com.androidpeople.view;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
public class WebViewExample extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
WebView webView = (WebView) findViewById(R.id.webview);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://myweb.com");
webView.setWebViewClient(new HelloWebViewClient());
}
}