1.我想要在android中拦截cordova加载的页面中的跳转请求。
2.没有找到合适的方式
3.google搜到以下答案,但以过时
appView.setWebViewClient(new CordovaWebViewClient( this) {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (loadUrlExternally){
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
}
}
4.当然我还是可以强行去重载,但不是好的方式
5.有高人提供一下更好的方式吗?非常感谢。
http://blog.csdn.net/lyhhj/ar...