ANDROID STUDIO WEBVIEW CODE
Wordpress Install via Direct Admin Panel in 3 Minutes #WordPress #WordpressInstall #AskHarish
WordPress Install via Direct Admin Panel in 3 Minutes
May 6, 2020

ANDROID STUDIO WEBVIEW CODE

<uses-permission  android:name="android.permission.INTERNET"></uses-permission>
android:id="@+id/webview"

import android.webkit.WebSettings;

import android.webkit.WebView;

import android.webkit.WebViewClient;
private WebView mywebView;
 mywebView=(WebView) findViewById(R.id.webview);

 mywebView.setWebViewClient(new WebViewClient());

 mywebView.loadUrl("https://coupon.technovedant.com/");

 WebSettings webSettings=mywebView.getSettings();

 webSettings.setJavaScriptEnabled(true);

public class mywebClient extends WebViewClient{
        @Override
        public void onPageStarted(WebView view, String url, Bitmap favicon){
            super.onPageStarted(view,url,favicon);
        }
        @Override
        public boolean shouldOverrideUrlLoading(WebView view,String url){
            view.loadUrl(url);
            return true;
        }
    }
@Override
    public void onBackPressed(){
        if(mywebView.canGoBack()) {
            mywebView.goBack();
        }
    else{
        super.onBackPressed();
            }
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Open chat
Powered by