= 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: {{{#!highlight sh cd /tmp wget http://nodejs.org/dist/v0.10.12/node-v0.10.12.tar.gz yum -y groupinstall "Development Tools" yum install httpd service httpd start # http://localhost:8880/ ./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 == * https://cordova.apache.org/docs/en/latest/guide/overview/index.html#architecture {{attachment:cordovaapparchitecture.png}} == Plugin dev == * https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/ 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 * https://cordova.apache.org/docs/en/latest/guide/platforms/android/plugin.html == Javascript interface == * https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/#the-javascript-interface * call cordova.exec to communicate with the native platform, {{{#!highlight javascript cordova.exec(function(winParam) {}, function(error) {}, "service", "action", ["firstArgument", "secondArgument", 42, false]); }}} === Adding Dependency Libraries === In the plugin.xml use the tag or use the tag.