Convert Website To Android App Using Android Studio

Convert Website To Android App Using Android Studio

Whether you are using WordPress or any other platform for your website, it is very easy to Convert a Website to Android App Using Android Studio with some basic code. It helps you to make a professional look of your online business in the field of mobile app.

Hi everyone, I am Saroj Meher, today I am going to discuss with you how to convert any website into a professional Android App.

Steps to Convert Website To Android App Using Android Studio

STEP 1 – Editing AndroidManifest.xml

Give Internet permission in AndroidManifest.xml file.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
    <uses-permission android:name="android.permission.INTERNET"></uses-permission>

        <activity android:name=".MainActivity">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />

Note: package=”“> – change the domain name and application name.

STEP 2 – Editing styles.xml

open style.xml file from res >> values >> styles.xml

Now replace all the pre code with this given code —

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>


STEP 3 – Editing activity_main.xml

Choose Android or Project >>App >>res >>layout >>activity_main.xml. Copy the code below and paste it in your xml file.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android=""

        android:layout_height="match_parent" />


Note: In the line tools:context=”” you need to put your domain name and app name.

STEP 4 – Editing

Now move to the main codding part that is –

Choose Android or Project >>App >>Java >>your app name >>

Paste the following code after the first line that is – package com.inspiritlive.application;

 import android.os.Bundle;
 import android.webkit.WebSettings;
 import android.webkit.WebView;
 import android.webkit.WebViewClient;

 public class MainActivity extends AppCompatActivity {
 private WebView mywebView;
    protected void onCreate(Bundle savedInstanceState) {
    mywebView = (WebView) findViewById(;
    WebSettings webSettings= mywebView.getSettings();

// Line of Code for opening links in app
    mywebView.setWebViewClient(new WebViewClient());

//Code For Back Button
    public void onBackPressed(){
        if(webView.canGoBack()) {


NOTE: Replace the URL ( with your Domain Name. Use https always as non-http is not supported in the android app.

FAQ on Convert Website To Android App Using Android Studio

How do I make an APK file from a website?

After doing all the above work, now your app is ready to build an APK file for your android app. In order to build an APK file, Go to – Build Menu – Generate Signed Bundle / APK. You can also upload this file to the Google Play Store.

How do you turn a website into an android app?

I have already discuss the simple steps to build a web view app for your website. In this way, you can turn any type of website into an android app.

Can I convert PHP website to Android app?

Yes, you can convert PHP website into an android app with the above procedures.

2 thoughts on “Convert Website To Android App Using Android Studio”

  1. Nice article.
    I have a question. Android Studio does not work on low end computer, in that case, is it a good idea to use online builder that converts my website into android app?

    1. Yes, you can use any online app builder to create that, but the only demerit is that either you have to pay some penny or they will place some ads on your App.

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.