Top 14 PhoneGap Interview Questions and Answers (2024)

Here are PhoneGap interview questions and answers for freshers as well as experienced developer candidates to get their dream job.


1) What is PhoneGap and why to use it?

PhoneGap is an open source framework, which enables you to develop applications for mobile devices by using web technologies like CSS3, JavaScript and HTML5 instead of using Java for Android, C# for windows phone devices and Objective C or Swift for iOS. It uses the native project format for each platform.

Free PDF Download: PhoneGap Interview Questions and Answers


2) 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

3) Explain what do you need to develop in PhoneGap?

For,

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

4) 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.

5) List out some of the PhoneGap events?

Some of the PhoneGap events include

  • Pause
  • Resume
  • Deviceready
  • Offline
  • Endcallbutton
  • Volumedownbutton and so on
PhoneGap Interview Questions
PhoneGap Interview Questions

6) 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.


7) 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.

PhoneGap
PhoneGap

8) 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

9) 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 height
  • Media Type: Here you can set the media type to select from

10) 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

11) 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

12) 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

13) 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

14) Mention what are the storage option does PhoneGap can access?

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

These interview questions will also help in your viva(orals)

Share

Leave a Reply

Your email address will not be published. Required fields are marked *