List of usage examples for org.apache.cordova CordovaPlugin initialize
public void initialize(CordovaInterface cordova, CordovaWebView webView)
From source file:plugin.google.maps.GoogleMaps.java
@SuppressWarnings("rawtypes") private void loadPlugin(String serviceName) { if (plugins.containsKey(serviceName)) { return;/* w ww .j av a2 s . c o m*/ } try { String className = "plugin.google.maps.Plugin" + serviceName; Class pluginCls = Class.forName(className); CordovaPlugin plugin = (CordovaPlugin) pluginCls.newInstance(); PluginEntry pluginEntry = new PluginEntry("GoogleMaps", plugin); this.plugins.put(serviceName, pluginEntry); plugin.privateInitialize(className, this.cordova, webView, null); plugin.initialize(this.cordova, webView); ((MyPluginInterface) plugin).setMapCtrl(this); if (map == null) { Log.e(TAG, "map is null!"); } } catch (Exception e) { e.printStackTrace(); } }