How to Convert Website into Android App using Android Studio

How to Convert Website into Android App using Android Studio

This is the Quick Tutorial to Convert Your Website into Android

App using Android Studio,  you dont need any command on Programming to do this Task

Just Follow the Steps mentioned below

  1. Install the Android Studio App, if You Dont Know how to install and configure you can refer Youtube
  2. Now open the Android Studio App , make Sure that You have 2gb of Ram Free to use android Studio

How to Convert Website into Android App using Android Studio

3. Click on Start New Android Studio Project

4. Fill the Project Name and Package Name 

5.Select the Android version that you want to Select ( i Recommend you to select the   4.0.1)

6.Just Watch the Video for Next Steps

How to Convert Website into Android Application

 

https://www.youtube.com/watch?v=AnHWVbK323A&t


MainActivity.java

import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends AppCompatActivity {
    private WebView myWebView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        myWebView = (WebView)findViewById(R.id.webView);
        WebSettings webSettings = myWebView.getSettings();
        webSettings.setJavaScriptEnabled(true);
        myWebView.loadUrl("http://www.toptipstricks.com");
        myWebView.setWebViewClient(new WebViewClient());

    }

    @Override
    public void onBackPressed() {
        if(myWebView.canGoBack()){
            myWebView.goBack();
        } else {
            super.onBackPressed();
        }
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
}


AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET"></uses-permission>