Interview Questions (1/2): PhoneGap & Cordova

What is PhoneGap?

PhoneGap is an open source framework for building cross-platform native applications using standard web technologies such as HTML, CSS and JavaScript.

What is Cordova?

Cordova is also an open-source mobile application development framework. The applications can be built using HTML, CSS, JavaScript in-order to develop cross-platform applications. Cordova is an Engine that powers PhoneGap

What is the difference between Cordova and PhoneGap?

Cordova is open-source platform that helps helps in developing and contributing the application.  PhoneGap is distribution of cordova that provides integration to Adobe’s utilities and services.

Cordova is Engine to PhoneGap.

PhoneGap is used when any Adobe services are required in the application.

List platforms supported by PhoneGap

PhoneGap supports Android, iOS, Blackberry 10, Firefox OS, Amazon Fire OS, Windows Phone8, Windows8

List few APIs supported by PhoneGap

Camera, Contacts, Battery Status,

Device [collect device related information],

File System , File Transfer [Access native file system through JavaScript], 

InAppBrowser [Launch URLs in another in-app browser instance],

Media [Record and play back audio files],

Accelerometer [Access Device Motion sensor], etc.

List the events supported by PhoneGap (or) What are the Cordova’s Life Cycle events?

deviceready [signals that cordova APIs are loaded and are ready to access],

pause [when the application is put in background to access other application],

resume [when the application is retrieved from the background],

backbutton [when user presses the back button],

menubutton [when user presses the menu button],

searchbutton [only for Android – when user presses the search button],

startcallbutton, endcallbutton [only for Blackberry10 – when user presses the start or end call buttons respectively],

volumedownbutton, volumeupbutton [only for Blackberry10 – When user presses the volume up or volume down buttons respectively]

How to use the cordova events?

document.addEventListener (“event_name” , callbackfunction , false);

function callbackfunction() { …. }

What is PhoneGap Build?

PhoneGap Build is a cloud-based packaging service for PhoneGap applications. It compiles the PhoneGap applications with the latest required SDKs for the application (i.e.; no need to manually download and maintain the SDK. Instead, use PhoneGap Build). It is easy to share the code and collaborate with it when PhoneGap Build is used.

References

PhoneGap Official Documentation

Other related blogs

Previous
Previous

What is a Hybrid Application?

Next
Next

Service vs Factory vs Provider