2015-08-26 34 views
1

我有一个基本的WebView应用程序应显示www.mysitename.com。虽然网站可以通过内置的浏览器和WebView,访问 我有一个问题,当我拨打的WebView链接的唯一的事(当我接近纸张流的浏览器,一切都很好)Android WebView页面不可用 - “com.fidelier.printfromweb”

<a onclick = "" href = "com.fidelier.printfromweb: // $ biguhw $ Print From Web intro $ $$ small $ Print small letter $ intro intro $$ $$ $$ intro cut $" data-role = "button" data-inline = "true"> Test print from web </a> 

https://play.google.com/store/apps/details?id=com.fidelier.posprinterdriver

我已经确保:
1.用于允许访问互联网的uses-permission标签是manifest标签的一个子标签。
2.为WebView启用javascript。

+0

你可以重新定义你的问题?如果您在WebView中调用链接会发生什么?任何链接或只是一个特殊的? –

+0

当调用链接 sale2211

回答

0

这是一个解决方案,这个问题是开放 外部链接

@Override 
      public boolean shouldOverrideUrlLoading(final WebView view, final String url){ 
       if(url.contains("com.fidelier.printfromweb:")){ 
        Uri uri = Uri.parse(url); 
        Intent intent = new Intent(Intent.ACTION_VIEW, uri); 
        startActivity(intent); 
        return true; //the webview will not load the URL 
       } else { 
        return false; //the webview will handle it 
       } 
      }