Snapchat Url 加载问题

Snapchat Url load issue

我已经在我的 Android 应用程序中集成了在 Snapchat 上关注我们,并为此显示 https://www.snapchat.com/add/danubeco URL in my default web view. This works fine in the Google Chrome but fails to load in the default browser of the device. Here is the error which am getting on trying in the web view - "Uncaught TypeError: Array.from is not a function", source: https://www.snapchat.com/deeplink/static/js/sc-web-frame.js。我试过几种设备并发现相同,但问题是它在 IOS 中工作得很好。我附上了带有错误的网络视图的屏幕截图。请建议我如何应对这个问题。

URL 截图所示 - snapchat://add/danubeco?sc_referrer=&link=%2Fadd%2Fdanubeco&sc_ua=Mozilla%2F5 .0+%28Linux%3B+Android+6.0%3B+Android+SDK+built+for+x86+Build%2FMASTER%3B+wv%29+AppleWebKit%2F537.36+%28KHTML%2C +like+Gecko%29+Version%2F4.0+Chrome%2F44.0.2403.119+Mobile+Safari%2F537.36&cid=b69e8a19-adf5-4209-9600-a26c0d5e0485

我只是在 xml 中获取了网页视图并在 java class 中编写了下面的代码。

webView = (WebView) root.findViewById(R.id.webView);
webView.setKeepScreenOn(true);
webView.getSettings().setLoadsImagesAutomatically(true);
webView.getSettings().setDomStorageEnabled(true);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setLoadWithOverviewMode(true);
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setBuiltInZoomControls(true);
webView.getSettings().setSupportZoom(true);
webView.setWebViewClient(new MyWebClient());
webView.loadUrl(url);

任何形式的帮助都将不胜感激。

谢谢。

尝试不在 shouldOverrideUrlLoading 上加载 url 并将条件设置为 false 这工作完美

   WebSettings settings = webview.getSettings();
    settings.setJavaScriptEnabled(true);
    //ws.setJavaScriptEnabled(true);
    settings.setJavaScriptCanOpenWindowsAutomatically(true);
    webview.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);



webview.setWebViewClient(new WebViewClient() {

        public boolean shouldOverrideUrlLoading(WebView view, String url) {


            if( url.startsWith("http:") || url.startsWith("https:") ) {
                return false;
            }
          //  Log.i(TAG, "Processing webview url click..."+url);
         //  view.loadUrl(url);

            return true;
        }


        public void onPageFinished(WebView view, String url) {
            Log.e(TAG, "Finished loading URL: " + url);
            if (progressBar.isShowing()) {
                progressBar.dismiss();
            }


        }


        public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {



        }
    });

    webview.loadUrl("https://www.snapchat.com/add/danubeco");