Changes to plugin API for new Phonegap version