How to create Android App For Website

How to create an android app for a website

As the technology is evolving businesses are also shifting from offline to online. That creates the need for retailers to be on the online platforms and one of the ways to be on the online platforms is by creating an android app. At present 87.5% of smartphones contains the android operating system. But what if you don’t want to invest much in-app development and want to create app at your own.

Now you are thinking that you have wasted your time because you are not a programmer.

Don't worry I will guide you on how to create an android app step by step for any website or blog even for your YouTube channel. Let me introduce some of the important terms. Without wasting much time let's proceed.

GRADLE

It a software used for building software. Also known as Build Automation Software or Build System.

Android Manifest

All the settings of an Android app along with components and metadata is described in an Android Manifest.XML All the permissions required for an app to work properly needed to be mentioned here. (Like if an app needs an internet connection, then it need to be declared in the manifest file).

WebView

A Webview is a component that allows the app to show Webpages.

Requirements:-

· PC or Laptop

· Android Studio

STEPS

Creating a Project:-

1. Create a new project and name it. I am creating an app for YouTube so I named it YouTube App.



2. Select the minimum SDK version so that your app supports most of the devices.


Adding Activity:-

1. Add an empty activity and name it as MainActivity. You might sometimes face a problem with the package name, then start naming it as com.example.(app name) this will surely resolve your problem.



2. Click on finish and wait till it builds Gradle. (Gradle building takes time depends on the efficiency of PC.)



Adding WebView:-

1. Click on activity main.xml and then design at the bottom. A text view element with Hello World already presents there, select it and delete it. After that select WebView from the palette menu and drag it on the screen shown in the editor and resize it according to your need.


2. Double click on the WebView in the editor and then assign an id to it as I did Web1.

MainActivity.Java:-

1. If we want that our app to behave as a WebView client ( an app that open a website inside it) then we need to mention it in the mainactivity.java else it will open in a browser.



2. Here we will declare what URL we want to load in the app.

Android Manifest:-

As I defined earlier all permissions of an app are mentioned in this. So our app needs internet access which we will declare in the android manifest.



So, our app is ready. Let us install it in our inbuilt android emulator and see how it works.

Now run the app in the android either on Android Emulator by clicking on the green Run app icon or by pressing (Shift+F10) or on Android Device connected through USB after turning on USB Debugging.

Youtube Video Link

https://www.youtube.com/watch?v=Dg4l62Weq5I