Sunday, September 24, 2017

Cordova

- create cross platform applications by using web technologies.

How it works
-  provides a base application based on a WebView where your newly developed application based in web can live.
- For advanced functions more closely related to concrete devices like GPS, battery, notifications, etc., Cordova allows the installation of plugins which provide a bridge between JavaScript and the native device based on an API.

$ npm install -g cordova

Creating an Cordova project

 cordova/
├── config.xml
├── hooks
├── platforms
├── plugins
└── www

    - config.xml is the main project configuration file. Here we will define many aspects and configurations for our application and even configure concrete details for the different platforms.
    - hooks allows to run scripts in the different Cordova build phases. This directory is now deprecated in favour of hooks configured in config.xml, so we can safely remove it.
    - platforms will contain the target platforms for our projects. At the moment it will contain only the browser platform, but it will grow with more targets. The modification of this directory by hand is discouraged.
    - plugins will contain the installed plugins. As explained before, plugins will help us to create richer applications by allowing us to access to native device functionality or abstracting from common functionalities.
    - www will contain the web application.


WebView
- allows you to easily add a web browser to your application.
- is a view that display web pages inside your application.
- it makes turns your application to a web application.

In addition to pages hosted on the web, you can also use it to display local content (including various document formats), and you can even interact with JavaScript in pages it has loaded.


Android WebView
iOS WebView


Cordova Plugin
A plugin is a bit of add-on code that provides access to device and platform functionality that is ordinarily unavailable to web-based apps.

Battery Status
    Monitor the status of the device's battery.

Camera
    Capture a photo using the device's camera.




No comments:

Post a Comment

Web Development

Design Phase:- Below all these represent different stages of the UX/UI design flow:- Wireframes represent a very basic & visual repr...