Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting existing static website to an android app (APK) using phonegap

I've a static website which purely uses only HTML5 and JS. And I have setup the phonegap in my windows 7 PC as well. My Question is what are the steps that I've to follow in order to create an android APK file out of the existing HTML/JS files. There are lot of tutorials on creating new phonegap project from the scratch. But I couldn't find any help on importing existing static website to phonegap project (please note that https://build.phonegap.com/apps is not an option for me.)

like image 565
Asanga Dewaguru Avatar asked Jul 18 '14 03:07

Asanga Dewaguru


Video Answer


1 Answers

"And I have setup the phonegap in my windows 7 PC as well."

I'm assuming your CLI is ready for cordova development. Then it's enough to follow this tutorial/documenation.

Go to your desired directory where you want to build your project. e.g.

d:
cd d:\myworks

Then create a cordova project

cordova create hello com.example.hello HelloWorld

go inside the project directory

cd hello

And platform android

cordova platform add android

There will be a www folder inside yourProject hello->www

Delete all css js html folders inside that directory and put your static pages there.

connect your device to PC and run cordova run android

like image 92
AtanuCSE Avatar answered Sep 24 '22 05:09

AtanuCSE