Skip to content

Supporting a plugin

jxp edited this page Mar 16, 2012 · 3 revisions

Adding support for a PhoneGap plugin should be very easy.

  1. Inspect the plugin javascript to determine what methods it has and what data (if any) it returns.
  2. Create a json file containing sample data for the plugin methods
  3. Create a substitute javascript file for the plugin

    Load the json data into phonegapdesktop using parseConfigFile
    Implement all the api methods using randomException (when appropriate), getDebugValue (to read json data) or intervalFunction for methods that repeat on an interval

See the barcode scanner plugin example in the source.

Clone this wiki locally