Convert any website to android application with android studio

0

Hello Everyone!

In this I am going to show you how to develop an android app for your website. android app for my website blog.cloudinfoways.com. which you can see on your screen right now.

Android App for my site

For this all we are going to use a software called Android Studio. Need not to worry as if you don’t have it you can download it before proceeding further. I have mentioned the link in the description box, you can download it from there.

Step 1:

Open Android Studio

First click on the start menu and open Android Studio, this is definitely gonna take some time as this a heavy application.

Android Studio

Step 2:

Create New Android Studio

Create a new project by clicking on create a new android studio project.

 startnewandroid

Step 3:

Naming the project

Name the project whatever you want as I am naming it ‘Tutorials’ now click next.

 nametutorial

Step 4:

Choose SDK

Choose minimum sdk as API 17:Android 4.2. Again click next

api17

Step 5:

Choose blank activity

 blankactivity

Step 6:

Now click finish

 clickfinish

Step 7:

Edit in content main

As you can see that project is rendering. Now start editing content_main.xml.

Here you have to change ViewtowebView. Then remove ‘text’ and replace it with ‘id’. Now give the id as “@+id/activity_main_webview”. Remember one thing you can get all the lines of which I am editing in this video from the description section. So at this point of time just watch and remember the things what I am doing.

 pic2

Step 8:

Go to main activity java file

Now go to mainActivity.java file and press enter. Here you need to write a line of code.

privateWebView  mWebView;

Now scroll down and remove these lines of code and add the following lines.

mWebView=(WebView)

find ViewById (R.id.activity_main_webview) ;

WebSettingswebSettings = mWebView.getSettings () ;

WebSettings.setJavaScriptEnabled (true) ;

mWebView.loadURL (http://blog.cloudinfoways.com/) ;

see as I am using my URL that is blog.cloudinfoways.com which you can replace it with your URL.

 Go to main activity java file

Step 9:

Add line of course to android manifest

Now as you have edited files now it’s time to give internet permission to the app for that we have to add a line of course in androidmanifests.xml

Now click on manifests and open androidmanifests.xml. Add the following line:

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

pic4

Save the files.

Click on the build and then on “build apk”. It will take some time to create the apk file for the project.

As you can see the grandle is running and building the apk file for the application.

Once the apk file gets generated copy it to the android phone.

APK file

Now use your android phone to install the application.

 Application

Visit Us At: https://www.youtube.com/watch?v=iKRR9UyhQdY

Share.

About Author

Leave A Reply