Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

How to develop Android App for your website

How to develop Android App for your website

WebView:

A webview is functionality provided by Android to create the easy webview of any website.

Converting a website into an android app

A webview is used to convert a website into the android app with few steps and in no time. Let’s create an android app for a website. You have to follow following steps to create your android app for a website.

Let’s start:

Steps:

  1. Start android studio.
  2. Create a new project and click next.
How to develop Android App for your website

How to develop Android App for your website

  1. Select phone and tablet and click next.
WEBVIEW APPDEVELOPMENT

WEBVIEW APP DEVELOPMENT

  1. Choose an empty activity and click next.
Android App for your website

Android App for your website

  1. Give a name to your activity or let it by default and click finish and wait while gradle is building.
Android App for your website EASY WAY

Android App for your website EASY WAY

  1. Go in activity_main.xml or activity_(your activity name).xml.
  2. Delete this code from line 2 <android.support.constraint.ConstraintLayout and replace it with <RelativeLayout.

Converting a website into an android app

Converting a website into an android app

  1. Now in the body of RelativeLayout write this code: <WebView

android:layout_width=”match_parent”

android:layout_height=”match_parent”

android:id=”@+id/my_webview”/>

  1. Now go into MainActivity.java.
  2. Go after public class MainActivity extends AppCompatActivity {
  3. And write WebView myWebView;

  1. Now go after setContextView(R.layout.activity_main); and press enter
  2. Write myWebView = (WebView) findViewById(R.id.my_webview); and press enter.
  3. Write myWebView.setWebViewClient(new WebViewClient()); and press enter.
  4. Write myWebView.getSettings().setJavaScriptEnabled(true); and press enter.
  5. Write myWebView.loadUrl(“any URL for example https://www.t4tutorials.com”);

  1. Now open manifests file from the left side just above java.

  1. Go on line before start of <application.
  2. Write <uses-permission android:name=”android.permission.INTERNET” />

  1. And now run your app on an android device or amulator.

  1. And now your android app for your website is ready.