title: android webview open google maps app
body: <p>i have an android web view and it displays the site correctly but when i press a link with geo data i get an the following error:
  "webiste is unavailable the website geo:48.9596430,9.125670?q=48.959630,9.125670 couldnt be loaded"</p>
  
  <p>net::ERR_UNKNOWN_URL_SCHEME</p>
  
  <p>when i open the same site on my chrome browser it opens my google maps with the desired cordinates.. now im windering why my webview doesnt do it :S </p>
  
  <p>here is the webiew code:</p>
  
  <pre><code>public class MainActivity extends Activity {
  
      /**
       * WebViewClient subclass loads all hyperlinks in the existing WebView
       */
      public class GeoWebViewClient extends WebViewClient {
          @Override
          public boolean shouldOverrideUrlLoading(WebView view, String url) {
              // When user clicks a hyperlink, load in the existing WebView
              view.loadUrl(url);
              return true;
          }
      }
  
      /**
       * WebChromeClient subclass handles UI-related calls
       * Note: think chrome as in decoration, not the Chrome browser
       */
      public class GeoWebChromeClient extends WebChromeClient {
          @Override
          public void onGeolocationPermissionsShowPrompt(String origin,
                                                         GeolocationPermissions.Callback callback) {
              // Always grant permission since the app itself requires location
              // permission and the user has therefore already granted it
              callback.invoke(origin, true, false);
          }
      }
  
      WebView mWebView;
  
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          mWebView = (WebView) findViewById(R.id.webView);
          // Brower niceties -- pinch / zoom, follow links in place
          mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
          mWebView.getSettings().setBuiltInZoomControls(true);
          mWebView.setWebViewClient(new GeoWebViewClient());
          // Below required for geolocation
          mWebView.getSettings().setJavaScriptEnabled(true);
          mWebView.getSettings().setGeolocationEnabled(true);
          mWebView.setWebChromeClient(new GeoWebChromeClient());
  
          mWebView.loadUrl("http://www.bda-bawue.de");
      }
  
  
  
      @Override
      public void onBackPressed() {
          // Pop the browser back stack or exit the activity
          if (mWebView.canGoBack()) {
              mWebView.goBack();
          }
          else {
              super.onBackPressed();
          }
      }
  </code></pre>
  
  <p>and this link should be opened:</p>
  
  <pre><code>&lt;a href="geo:48.959630, 9.125670?q=48.959630, 9.125670"&gt;
  </code></pre>
  
  <p>permissions:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.INTERNET"/&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_GPS" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
  </code></pre>
  
  <p>do i have to change the link for an android web view or whats the point?</p>