Like Mark Murphy guessed, I set the WebViewClient and put some code in
shouldOverrideUrlLoading() to do this.

I created a method called setWebViewClient(WebView view) which creates
an anonymous class for the WebViewClient that starts out like this...
---------------------------------------
    private void setWebViewClient(final WebView view) {
        view.setWebViewClient(new WebViewClient() {

            @Override
            public boolean shouldOverrideUrlLoading(final WebView
view, final String url) {
     .
     .
     .

-----------------------------------------------

Inside the shouldOverrideUrlLoading() method I have code like the
following

if (url.startsWith("mailto:";) || url.startsWith("geo:") ||
url.startsWith("tel:")
                                || url.startsWith("http://";) ||
url.startsWith("https://";)) {
                            Intent intent = new Intent
(Intent.ACTION_VIEW, Uri.parse(url));
                            startActivity(intent);
}

This causes the Activity that is registered to handle each protocol
type to automatically respond and load up.

Jack C. Holt
jackcholt.blogspot.com
Twitter: hackeyflack
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to