Skip to content

Instantly share code, notes, and snippets.

@saurabhalang
Last active October 14, 2023 22:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save saurabhalang/fc270d8c0def8dea1c33 to your computer and use it in GitHub Desktop.
Save saurabhalang/fc270d8c0def8dea1c33 to your computer and use it in GitHub Desktop.
How to convert any Website into Android App in Android Studio?
// add this code to the onCreate method of your MainActivity.java File
String url ="URL" ; // Replace URL with your website address like this "http://google.com"
WebView view = (WebView) this.findViewById(R.id.webView);
view.getSettings().setJavaScriptEnabled(true);
view.loadUrl(url);
@vastris
Copy link

vastris commented Jul 11, 2023

This is a very concise and effective way of how to convert website to android app. You have shown how to use WebView and Android Studio to create a simple app that loads a website. I think this is a good solution for anyone who wants to make a basic app without much hassle. Thanks for sharing this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment