mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 02:12:58 +08:00
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:
parent
969f0c87d7
commit
b850d225f4
@ -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);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user