Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a PhoneGap plugin and build the app with Phonegap build

We have some doubts about how to integrate phonegap plugins and then build our mobile application with phonegap build, is it possible?

When you build your app with Phonegapbuild it builds up for all the supported devices, but the instructions regarding how to install any plugin in phonegap are specific for Android/ios/Windows phone etc.. so

How could we install a specific plugIn and then use the phonegap build?

In case that is not possible, what other options do we have to build a phonegap app?

Thanks in advance.

like image 702
Javier Hertfelder Avatar asked Jun 21 '13 10:06

Javier Hertfelder


People also ask

What is PhoneGap plugin?

Apache Cordova and Adobe PhoneGap provide a way for developers to develop apps for all major platforms in HTML, CSS and JavaScript. Developers only have to maintain a single codebase for all platforms. The project started out as PhoneGap and when it was acquired by Adobe the code was released as Apache Cordova.

What is the PhoneGap build?

PhoneGap is a software development framework by Adobe System, which is used to develop mobile applications. To develop apps using PhoneGap, the developer does not require to have knowledge of mobile programming language but only web-development languages like, HTML, CSS, and JScript.


1 Answers

Plugins are native code extensions that phonegap apps are able to invoke via javascript, therefore the plugin must be implemented in the native language of each target platform, i.e. Java for Android, Objective-C for iOS, etc.

There is a hand-picked list of plugins available when using Phonegap Build for the Android and iOS platforms.

However, if you want to use plugins other than these, or to target platforms other than iOS and Android, you'll need to set up a native development environment for each of your target platforms (e.g. Eclipse for Android, Xcode for iOS) to build your phonegap app yourself.

This isn't as daunting as it sounds since there's really good getting started guides for each platform that Phonegap supports.

like image 197
DaveAlden Avatar answered Nov 02 '22 06:11

DaveAlden