Support old way of adding service in PhoneGap 0.9.5

PhoneGap 0.9.4 replaced PluginManager.addService() with navigator.app.addService().  This is problematic with the older plugin as they are not being maintained.  I'm adding in a PluginManger JavaScript class which will implement the addService method and call navigator.app.addService() method under the hood.  This way we won't break old code.
This commit is contained in:
macdonst 2011-03-30 03:39:27 +08:00
parent 969f0c87d7
commit b850d225f4

View File

@ -893,3 +893,16 @@ PhoneGap.includeJavascript = function(jsfile, successCallback) {
el.src = jsfile;
id.appendChild(el);
};
/**
* This class is provided to bridge the gap between the way plugins were setup in 0.9.3 and 0.9.4.
* Users should be calling navigator.add.addService() instead of PluginManager.addService().
* @class
* @deprecated
*/
var PluginManager = {
addService: function(serviceType, className) {
navigator.app.addService(serviceType, className);
}
};