my website link is this https://ommaurya.com/courses-online/login.php and after login page coming https://ommaurya.com/courses-online/student_view.php ChatGPT said: Thanks! Since your website starts with a login page (login.php), and then redirects to a student dashboard (student_view.php), you can still use the WebView approach to show this in your Android app. I'll give you the complete working Java code with your real URL and explain how it works, including: Login via WebView Staying logged in (session handling) Proper back button handling ✅ Final Code to Display Your Website 🔹 AndroidManifest.xml (Add Internet Permission) Add this line above the tag: 🔹 activity_main.xml (WebView Layout) 🔹 MainActivity.java (Java Code) package com.example.mywebsiteapp; import android.os.Bundle; import android.webkit.CookieManager; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import androidx.appcompat.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { private WebView myWebView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); myWebView = findViewById(R.id.webview); // Enable JavaScript and cookies WebSettings webSettings = myWebView.getSettings(); webSettings.setJavaScriptEnabled(true); CookieManager.getInstance().setAcceptCookie(true); CookieManager.getInstance().setAcceptThirdPartyCookies(myWebView, true); // Load links inside the WebView instead of opening in browser myWebView.setWebViewClient(new WebViewClient()); // Load your login page myWebView.loadUrl("https://ommaurya.com/courses-online/login.php"); } // Handle back button navigation @Override public void onBackPressed() { if (myWebView.canGoBack()) { myWebView.goBack(); } else { super.onBackPressed(); } } } ✅ What This App Does Loads the login page: https://ommaurya.com/courses-online/login.php Lets users log in via your existing web login form Automatically redirects to student_view.php after login Keeps session (via cookies) Stays entirely inside the app (not opening browser) Handles back button correctly