App not getting longitude and latitude from HTML and JAVA script
<p>I have a simple APP that calls a HTTPS page and latitude and longitude don't work when calling <a href="https://www.mypage.com/getlonlat.html" rel="nofollow noreferrer">https://www.mypage.com/getlonlat.html</a> from within my APP.  It works when calling page from IE, Chrome, Firefox ect.  getlonlat.html has javascript that uses GeoLocation to calculate longitude and latitude.  This page HAS a valid SSL.</p>

<pre><code>package com.mywebsite.webview;

    import android.app.Activity;
    import android.os.Bundle;
    import android.webkit.GeolocationPermissions;
    import android.webkit.WebChromeClient;
    import android.webkit.WebView;
    import android.webkit.WebViewClient;

     public class GeoWebViewActivity extends Activity {

        public class GeoWebViewClient extends WebViewClient {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {

        view.loadUrl(url);
        return true;
        }
    }


        public class GeoWebChromeClient extends WebChromeClient {
    @Override
    public void onGeolocationPermissionsShowPrompt(String origin,
         GeolocationPermissions.Callback callback) {

        callback.invoke(origin, true, false);
        }
    }

        WebView mWebView;


        @Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    mWebView = (WebView) findViewById(R.id.webView1);

    mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);

    mWebView.setWebViewClient(new GeoWebViewClient());

    mWebView.getSettings().setJavaScriptEnabled(true);
    mWebView.getSettings().setGeolocationEnabled(true);
    mWebView.setWebChromeClient(new GeoWebChromeClient());

    mWebView.loadUrl("https://www.mywebsite.com");
            if (mWebView.canGoBack()) {
                mWebView.goBack();
            }


    }

       @Override
public void onBackPressed() {
    // Pop the browser back stack or exit the activity
    if (mWebView.canGoBack()) {
        mWebView.goBack();
        }
    else {
        super.onBackPressed();
        }
    }

private void postUrl(byte[] postData,
                     String url) {  mWebView.goBack();

}
</code></pre>

<p>}</p>

<p>Index.html
</p>



<pre><code>    &lt;script&gt;
        function getLocation() {
            if (navigator.geolocation) {
                navigator.geolocation.getCurrentPosition(showPosition);
            }

        }
        function showPosition(position) {
            document.getElementById("getlat").value = position.coords.latitude;
            document.getElementById("getlon").value = position.coords.longitude;
        }


    &lt;/script&gt;
</code></pre>