WebView에서 tstore 어플 연동방법

2011. 4. 12. 13:58안드로이드 개발


 private class CallWebViewClient extends WebViewClient {
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
         if(url.startsWith("tstore:")) {

   Intent i = new Intent();

   i.setAction(Intent.ACTION_VIEW);

   Uri uri = Uri.parse(url);

               i.setData(uri);

               startActivity(i);


                return true ;

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

 WebView wikiBrowser = (WebView)findViewById(R.id.web);
 wikiBrowser.setWebViewClient(new CallWebViewClient());