Saturday, July 11, 2015

How to convert a website into an Android app



Hello, This article will guide you to setup android environment using Android Studio and also explains you how to convert your website into an android app in few simple steps.

News: You can check out new Micromax YU Yureka Plus

Step 1:

First and foremost, Download the Android Studio to set up an Android development environment.
you can download it from  this link.
After Downloading Install this software.

Step 2:

After installation, open the folder in which android studio is installed. It will be installed in the program files. And open SDK manager from that Android Studio folder.
Mostly the path will be C:\Program Files(x86)\Android\Android-Studio\sdk\sdk manager but may differ as per your installation.
You can also open SDK manager from Android Studio. go to Tools>android>SDK manager

Step 3:

After opening SDK manager install all the tools and also install at least one API of  an Android version you want to target.
See the Image for more details
SDK manager
SDK Manager: Installing Tools

SDK manager
SDK Manager: Installing API



































Step 4:

Open android Studio and create a new project
Give your application a name starting with a capital leter
Select the minimum API you want to target.(e.g. 4.2.2 API 17)(just remember lower the version you want to target lesser will be the features).
Select a Blank activity.

Step 5:

You will see your project open on the android studio
you will need to change three files from this project to serve your purpose.
activty_main.xml(this file will be there in layout folder under res)
MyActivity.java(this file will be there in java folder)
AndroidManifest.xml
So open this three files from the project.

Step 6:

Go to activity_main.xml file
add lines of code and do the changes as shown in the image. (selected portion in the image)
activity_main.xml
activity_main.xml












Step 7:

Go to MyActivity.java add lines of code as shown in the image in onCreate function
In this, add the URL of a site which you want to convert it to an android app.
In my case, I have given my site URL i.e. shreeontechnology.blogspot.in
MyActivity.java
MyActivity.java 

















Step 8:

Same way go to AndroidManifest.xml and give permissions.
AndroidManifest.xml
AndroidManifest.xml 
















Step 9:

Open AVD manager from android studio i.e. Go to Tools>android>AVD manager
Create one Virtual Device there. To create Select the create option and follow some simple steps.
Once you have created the Android Virtual Device start it. to start the device select the device and click on start.(if (it will take some time so have patience)

Step 10:

Once your AVD is started go to the Studio and run your app. Go to Run>run'app'
this will install your app in your AVD.
Your app will open on the AVD(have patience, may take some time)

So this is it, your website is converted into an android app in this few simple steps. If you think  this post is worth sharing please share. Also leave me a comment as how can i improve this post as well your experience while using this post.Thank You.

guest author area 51 About
Shrikrishna Parab is founder of The- WeOnTech. He is a researcher in the field of Computer Science and Technology. He is 25 and lives in Goa. You can Follow him on Twitter, Facebook and Google+.

No comments:

Post a Comment