Cordova
Apache Cordova is an open-source mobile development framework. It allows you to use standard web technologies such as HTML5, CSS3, and JavaScript for cross-platform development, avoiding each mobile platforms' native development language. Applications execute within wrappers targeted to each platform, and rely on standards-compliant API bindings to access each device's sensors, data, and network status.
CentOS 6.6
In CentOS 6.6 install the following:
- cd /tmp
- yum -y groupinstall "Development Tools"
- yum install httpd
- service httpd start
- ./configure
- make clean
- make
- make install
- cd ~
- npm install -g npm@latest
- npm install -g cordova
cordova create hello com.example.hello HelloWorld
- cd hello
- cordova platform add android
Structure:
. ./templates ./templates/footer.html ./templates/header.html ./templates/screen.first.html ./templates/screen.third.html ./templates/screen.second.html ./templates/screen.fourth.html ./templates/loader.html ./style ./style/style.css ./style/.directory ./style/loader.gif ./config ./config/config.common.js ./config/config.dev.js ./config/config.production.js ./config/config.testing.js ./app ./app/app.templates.js ./app/views ./app/views/app.views.Header.js ./app/views/app.views.Footer.js ./app/views/app.views.Loader.js ./app/views/screens ./app/views/screens/app.views.screens.Fourth.js ./app/views/screens/app.views.screens.BaseScreen.js ./app/views/screens/app.views.screens.First.js ./app/views/screens/app.views.screens.Third.js ./app/views/screens/app.views.screens.Second.js ./app/.directory ./app/app.js ./app/app.screen.js ./app/app.loader.js ./img ./img/logo.png ./lib ./lib/jquery-1.8.3.min.js ./lib/underscore-min.js ./lib/backbone-min.js ./lib/toe.js ./js ./js/index.js ./css ./css/index.css ./index.html
Architecture
Plugin dev
A plugin is a package of injected code that allows the Cordova webview within which the app renders to communicate with the native platform on which it runs. Plugins provide access to device and platform functionality that is ordinarily unavailable to web-based apps.
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
Adding Dependency Libraries
In the plugin.xml use the <framework /> tag or use the <lib-file /> tag.