Geolocation cannot be load on webview
<p>I want to load Geolocation into my webview on android 2.1. The geolocation works well on my browser, but it does fail on webview.</p>

<pre><code>public class WebPageLoader extends Activity implements GeolocationPermissions.Callback{

    WebView webview;
    String geoWebsiteURL = "http://hngu.naf.cs.hut.fi/current_location.html";
    public WebPageLoader() {
    }

    /**
     * Called with the activity is first created.
     */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.main);

        webview = (WebView) findViewById(R.id.webview);
        webview.getSettings().setJavaScriptEnabled(true);
        webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
        webview.getSettings().setGeolocationEnabled(true);  //seems like if i set this, the webview should prompt when I call navigator.geolocation.getCurrentPosition
        GeoClient geo = new GeoClient();
        webview.setWebChromeClient(geo);        
        String origin = ""; //how to get origin in correct format?
        geo.onGeolocationPermissionsShowPrompt(origin, this);  //obviously not how this is meant to be used but expected usage not documented
        webview.loadUrl(geoWebsiteURL);        

    }

    public void invoke(String origin, boolean allow, boolean remember) {

    }

    final class GeoClient extends WebChromeClient {

    @Override
    public void onGeolocationPermissionsShowPrompt(String origin,
    Callback callback) {
    // TODO Auto-generated method stub
    super.onGeolocationPermissionsShowPrompt(origin, callback);
    callback.invoke(origin, true, false);
    }

    }

    }
</code></pre>

<p>My manifest.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="net.Webview_Android"
      android:versionCode="1"
      android:versionName="1.0"&gt;

    &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
    &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
    &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
    &lt;uses-permission android:name="android.permission.ACCESS_LOCATION" /&gt;
    &lt;uses-library
        android:name="com.google.android.maps" /&gt;  
    &lt;uses-permission android:name="android.permission.ACCESS_GPS" /&gt;
    &lt;uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" /&gt;
    &lt;uses-sdk android:minSdkVersion="7" /&gt; 
    &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
        &lt;activity android:name=".WebPageLoader"
                  android:label="@string/app_name"
                  android:theme="@android:style/Theme.NoTitleBar"&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;
                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;

    &lt;/application&gt;
&lt;/manifest&gt;
</code></pre>

<p>When I run the app. It display the google map with the marker. However, it cannot find the current location even though my html file works well. Please help me. Thank you so much.</p>
