January 23, 2018

Sreekanth B

Phonegap Technical Interview Questions And Answers

What Is Phonegap?

PhoneGap is an open source solution for building cross-platform mobile apps with standards-based Web technologies like HTML, JavaScript, CSS.
It is a wrapper used for native packaging of mobile web application which is used to build cross platform mobile Application.

Who Developed Phonegap ?

It is developed by Nitobi, a company based in Vancouver, Canada.
Nitobi was acquired by Adobe Corporation on the year of 2011.
After the acquisition Adobe released PhoneGap technology as open source under the name Apache Cordova.

Explain Phonegap Architecture?

PhoneGap has a plugin-based architecture. Each device-specific feature is a plugin, which consists of javascript and native sides.
 Js side should be as cross-platform as possible, whereas native side can be implemented only once, for 1 device. Nevertheless built-in plugins are developed for all of the most popular platforms, so no need to reinvent the wheel.
This architecture, together with open source code, not only allows a developer to fix their bugs, but also allows them to tweak their plugins for as per requirements. Also, a developer can build his own plugin, and support any platform of his choice.

Why Should Mobile Developers Consider Phonegap?

Mobile developers use PhoneGap because it allows them to have a common codebase for all their application code. It doesn’t force developers to reinvent the wheel every time they move from platform to platform.

Advantages Of Phonegap ?

One codebase can be maintained for multiple  platforms
Reuse existing web developer skills
Faster development
Based on open standards

What Is Phonegap Cordova ?

Mobile market is huge with bunch of opportunities. At the same time it is really painful experience for the developers to make an application reach to the wider audience.
There are multiple platforms like android, iPhone, Blackberry, windows comes with lot different capabilities. Every platform uses different programming language syntax and different distribution process.
As the programming platforms are different, developing an application requires putting the separate development effort for different platforms.

What Is The Difference Between Phonegap And Cordova?

PhoneGap was donated to the Apache Software Foundation (ASF) under the name Apache Cordova. Through the ASF, future PhoneGap development will ensure open stewardship of the project. It will remain free and open source under the Apache License, Version 2.0.

PhoneGap is an open source distribution of Cordova. Think about Cordova’s relationship to PhoneGap like WebKit’s relationship to Safari or Chrome.

What Is Phonegap Build, And How Is It Different From Phonegap Framework?

PhoneGap is a mobile application development framework, based upon the open source Apache Cordova project.It allows you to write an app once with HTML, CSS and JavaScript, and then deploy it to a wide range of mobile devices without losing the features of a native app.
PhoneGap Build is a cloud-based service built on top of the PhoneGap framework.
It allows you to easily build those same mobile apps in the cloud.

What Is A Hybrid App?

A hybrid application is one that has features of both a web application and a native application. Certain features, such as Image Capture, NFC or Android OpenAccessory, may be implemented natively since there is currently no way to do this in JavaScript. But the application logic and the UI are implemented using web technologies to allow for a consistent and unique user experience across devices.

What Are The Phonegap Events?

 The phone gap events are listed below:

deviceready
pause
resume
online
offline
backbutton
batterycriticalbatterylow
batterystatus
menubutton
searchbutton
startcallbutton
endcallbutton
volumedownbutton
volumeupbutton

Can You Use Php/asp/jsf/java/.net With Phonegap?

A PhoneGap application may only use HTML, CSS, and JavaScript. However, you can make use of network protocols (XmlHTTPRequest, Web Sockets, etc) to easily communicate with backend services written in any language. This allows your PhoneGap app to remotely access existing business processes while the device is connected to the Internet.

How Much Does Phonegap Cost?

 PhoneGap is an open source implementation of open standards and FREE. That means developers and companies can use PhoneGap for mobile applications that are free, commercial, open source, or any combination of these.

What Does Phonegap Plugin Consist Of? What Are The Files Required To Create Your Own Phonegap Plugin For Ios?

PhoneGap plugin contains two files

JavaScript file that defines the function for accessing the native hooks
Implementation files written in the native language to co-ordinate with native phone features
To create your own PhoneGap plugins, you have to
Make a new directory in your ${PROJECT_DIR}/plugins directory
Make a JavaScript file within that new directory
Make a new Objective-C class that extends the PhoneGap command class and also in the new directory.

How Does Phonegap Simplifies Mobile Development?

Building applications for each device–iPhone, Android, Windows Mobile and more–requires different frameworks and languages.
One day, the big players in mobile may decide to work together and unify third-party app development processes.
Until then, PhoneGap will use standards-based web technologies to bridge web applications and mobile devices. Plus, because PhoneGap apps are standards compliant, they’re future-proofed to work with browsers as they evolve.
PhoneGap is an open source implementation of open standards. That means developers and companies can use PhoneGap for mobile applications that are free, commercial, open source, or any combination of these.

What Are The Platforms That Phonegap Supports ?

The platforms phone gap supports are:

iphone/iphone 3G and Higher
Blackberry os 5.x and Newer
Android
Web OS
Tizen
Windows Phone 7
Symbian
Bada

Mention What Are The Ios Quirks For A Compass Heading Object?

For a compass heading object the iOS quirks are

trueHeading is returned only when location services are executing through geolocation.watchlocation()
For iOS>4 devices, if the mobile device is revolved or rotated and the app supports that orientation, the heading value will be reported back with respect to the current orientation

Explain What Is Media.seekto And Media.getduration Function In Opengap Media Api?

seekTo in OpenGap Media API is a function that updates the latest position of the underlying audio file of a Media Object
getDuration is a function that returns the duration of the audio file in seconds. It will return the value -1, if the duration is unknown.

What Is Phonegap Features?

It is not only the purpose of PhoneGap to distribute the web application to application store.
It is also providing the feature to access the device hardware from web application.
It allows you to package your mobile web application code and resources into a binary app and ready to distribute to Apple, Android, Palm, Symbian, and BlackBerry devices.

Explain How You Can Upgrade Phonegap?

To upgrade PhoneGap in Mac and Linux

$ sudo npm install –g phonegap
For Windows:

C:> npm install –g phonegap

Explain What Are The Limitation Of Phonegap?

As the front-end uses JavaScript it does have some limitation

Data processing: Compare to JavaScript native language is much faster
Back-ground processing: Large number of application depends on background thread while PhoneGap API are built using JavaScript which does not support multi-threaded and hence does not support back ground processing
Advanced graphics: Apps that use advanced graphics can be accessed explicitly by third party libraries, which can be best done natively
Complex business logic: Number of complex business app can be accessed better with a native code
Access advanced native functionality: Number of native API’s are not supported by PhoneGap’s API

Mention What Are The Storage Option Does Phonegap Can Access?

Memory-store.js (MemoryStore)
Is-store.js (LocalStorageStore)
Websql-store.js (WebSqlStore)

Explain How Do You Architect Phonegap Applications?

PhoneGap applications can be architect, in the same way, like other mobile web services. The main difference is that the initial HTML assets are available locally, instead of a remote server.  The PhoneGap application loads the initial HTML which can request resources from a server or from the local environment.  PhoneGap also supports the single page web experienced model.

List Out What Features Are Available In Phonegap Cameraoptions?

PhoneGap cameraoptions available are

Quality: It tells the quality of saved image that range from [0,100]
Destination Type: Choose the format of the return value. Defined in navigator.camera.DestinationType
Source Type: Set the source of the picture. Defined in navigator.camera
AllowEdit: Before selection of image, it allows simple editing of image
Encoding Type: It determines the encoding type of the returned image
TargetWidth: It determines how you can set image width
TargetHeight: It tells how you can set image heig
Media Type: Here you can set the media type to select from

List Out Some Of The Phonegap Api?

Some of the PhoneGap API are

Accelerometer
Camera
Capture
Compass
Connection
Contacts
Device
Geo-location and so on

Explain What Do You Need To Develop In Phonegap?

IOS: Xcode, iOS SDK
Android: Android SDK, ADT plugin
BlackBerry: Sun SDK, Apache ant and BlackBerry Webworks SDK
Symbian: SDK

Mention What Is The Difference Between Phonegap And Phonegap Build?

PhoneGap: It is a framework for mobile application development, built upon the open source Apache Cordova project. It permits you to write an app once with CSS, JavaScript, HTML and then deploys it to a broad range of mobile devices without losing the features of a native app.
PhoneGap Build: It is a cloud-based service built on top of the PhoneGap framework.

List Out Some Of The Phonegap Events?

Some of the PhoneGap events include

Pause
Resume
Deviceready
Offline
Endcallbutton
Volumedownbutton and so on

Mention The Difference Between Air And Phonegap?

The most fundamental differences between AIR and PhoneGap is that you build AIR applications using tools rooted in the Flash Platform, and you can develop PhoneGap application using HTML, CSS and JavaScript.  AIR applications use the AIR runtime, it enables you to have a single code base, with the exact similar expected behavior through all supported platforms.  PhoneGap applications execute inside of the native web browser component for each supported platform.  For separate platform, PhoneGap may behave differently.

Subscribe to get more Posts :