{"id":167,"date":"2020-05-28T10:32:24","date_gmt":"2020-05-28T06:32:24","guid":{"rendered":"http:\/\/kidds.co.za\/?p=167"},"modified":"2020-05-28T10:38:49","modified_gmt":"2020-05-28T06:38:49","slug":"java-webview","status":"publish","type":"post","link":"https:\/\/kidds.co.za\/index.php\/2020\/05\/28\/java-webview\/","title":{"rendered":"Java: WebView"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">\/\/Add the below line into your AndroidManifest.xml file or your app will not have internet access.\n&lt;uses-permission android:name=\"android.permission.INTERNET\"\/>\n\nimport android.webkit.WebView;\nimport android.webkit.WebViewClient;\n\nfinal WebView wv = (WebView) findViewById(R.id.<em>myWebView<\/em>);\n\/\/The below line tells the system that it must use your WebView to load URLs. \n\/\/Otherwise when you click a link within your WebView it android will ask which browser to open it with.\nwv.setWebViewClient(new WebViewClient());\nwv.loadUrl(\"https:\/\/www.kidds.co.za\");<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/\/Add the below line into your AndroidManifest.xml file or your app will not have internet access. &lt;uses-permission android:name=&#8221;android.permission.INTERNET&#8221;\/> import android.webkit.WebView; import android.webkit.WebViewClient; final WebView wv = (WebView) findViewById(R.id.myWebView); \/\/The below line tells the system that it must use your WebView to load URLs. \/\/Otherwise when you click a link within your WebView it android will [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,13],"tags":[],"class_list":["post-167","post","type-post","status-publish","format-standard","hentry","category-java","category-snippets-java"],"_links":{"self":[{"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/posts\/167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/comments?post=167"}],"version-history":[{"count":3,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/posts\/167\/revisions"}],"predecessor-version":[{"id":172,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/posts\/167\/revisions\/172"}],"wp:attachment":[{"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/media?parent=167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/categories?post=167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kidds.co.za\/index.php\/wp-json\/wp\/v2\/tags?post=167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}