Search code examples
cordovaandroid-fullscreen

How do i add custom plugin and use it in phonegap build?


I have phonegap app build in "build.phonegap", which means i have only xml file to configure my phonegap plugins.

What i want is to have a full-screen on android, for me it means the "navigation bar" should be removed!

After much searching i found this plugin:

https://github.com/mesmotronic/cordova-fullscreen-plugin

The reason i want to use this plugin is because i can't find another way to hide the navigation bar, and other configs in my xml that i thought would do such a thing, like:

<preference name="fullscreen" value="true" />

not doing what i intended, so the plugin is a last resort (or is it?)

1) How can i add this plugin to phonegap build and configure it in the xml? Is this suppose to helping me?

http://phonegap.com/blog/2014/01/30/customizing-your-android-manifest-and-ios-property-list-on-phonegap-build/

2) If still it's not possible for some reason (to use the plugin for the purpose of hiding the navigation bar), how can i just disable the behavior of the navigation bar (in android) at all?


Solution

  • Now you can install any plugin from NPM or github. For NPM just search for the package on http://npmjs.com/ and add it like this:

    <plugin name="cordova-plugin-geolocation" spec="~4.0.1" />
    

    For installing from github, search for the plugin on github and add it like this:

    <plugin name="cordova-plugin-camera" spec="https://github.com/apache/cordova-plugin-camera.git" />
    

    OLD ANSWER:

    On phonegap build you can only use plugins from:

    https://build.phonegap.com/plugins

    http://plugins.cordova.io/

    If the plugin isn't there, you can ask the plugin author to submit it, or fork it and submit it yourself (if you want to submit it to the phonegap build repository you need a paid plan)