How To Convert Any Website Into a Android App using ANDROID STUDIO 2023 @RockingSupport ​


How To Convert Any Website Into a Android App using ANDROID STUDIO 2023  @RockingSupport ​


How To Convert Any Website Into a Android App using ANDROID STUDIO 2023 [HINDI] 

Add Below line of code AndroidManifast.xml Add Below line of code activity_main.xml android:id="@+id/webview" 
 Add Below line of code MainActivity.java 
 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://grizzet.com/"); 
WebSettings webSettings=mywebView.getSettings(); 
webSettings.setJavaScriptEnabled(true);

 Add Below line of code MainActivity.java (Function)

 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();
            }
}

Comments