{"id":2245,"date":"2022-08-30T15:23:15","date_gmt":"2022-08-30T15:23:15","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/01\/05\/load-a-php-page-which-has-a-flash-by-webview-and-crash-without-error-log-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:23:15","modified_gmt":"2022-08-30T15:23:15","slug":"load-a-php-page-which-has-a-flash-by-webview-and-crash-without-error-log-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/load-a-php-page-which-has-a-flash-by-webview-and-crash-without-error-log-collection-of-common-programming-errors\/","title":{"rendered":"load a php page which has a flash by webview and crash without error log-Collection of common programming errors"},"content":{"rendered":"<p>I have occurred a problem. In my app,I load a url(a php page) by webview. It runs fun in many devices.But in a TV device,it offen exit without any error log.Now I know it is because the php page load a swf flash.But the page show well in the browser in the Tv.My code is as follows:<\/p>\n<pre><code>mWebView = (WebView) v.findViewById(R.id.shopWebView);\nmWebView.setOnKeyListener(this);\nmWebView.setInitialScale(100);\n\nWebSettings webSet = mWebView.getSettings();\nwebSet.setJavaScriptEnabled(true);\nwebSet.setBlockNetworkImage(true);\nwebSet.setSupportZoom(true);\nwebSet.setBuiltInZoomControls(true);\nwebSet.setSupportMultipleWindows(true);\nwebSet.setUseWideViewPort(true);\nwebSet.setLoadWithOverviewMode(true);\n\/\/      webSet.setPluginState(PluginState.ON);\n\nmWebView.setWebViewClient(new WebViewClient() {\n\n    @Override\n    public void onPageFinished(WebView view, String url) {\n        view.getSettings().setBlockNetworkImage(false);\n    }\n});\n\nmWebView.loadUrl(URL_SHOP);\n<\/code><\/pre>\n<p>Who can tell me what&#8217;s wrong with my code or the reason of this case?(Forgive my poor English.)<\/p>\n<ol>\n<li>\n<p>Use WebChromeClient. That May help.<\/p>\n<pre><code>webView.setWebViewClient(new MyWebClient()); \n\npublic class MyWebClient extends WebChromeClient {\n\n}\n<\/code><\/pre>\n<\/li>\n<li>\n<p>I have solved this problem.I did like this:Before webview load url,I set the webview gone;and set webview visible in onPageFinished().Although I have solved the problem,but I don&#8217;t know the exactly reason of that condition.If anyone know,please tell me.Is it because the TV&#8217;s vedio memory or other things like that?<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2014-01-05 09:32:05. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I have occurred a problem. In my app,I load a url(a php page) by webview. It runs fun in many devices.But in a TV device,it offen exit without any error log.Now I know it is because the php page load a swf flash.But the page show well in the browser in the Tv.My code is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2245","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2245","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2245"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2245\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}