Java Code Examples for org.apache.cordova.CordovaPlugin#privateInitialize()

The following examples show how to use org.apache.cordova.CordovaPlugin#privateInitialize() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PluginManager.java    From L.TileLayer.Cordova with MIT License 6 votes vote down vote up
/**
 * Get the plugin object that implements the service.
 * If the plugin object does not already exist, then create it.
 * If the service doesn't exist, then return null.
 *
 * @param service       The name of the service.
 * @return              CordovaPlugin or null
 */
public CordovaPlugin getPlugin(String service) {
    CordovaPlugin ret = pluginMap.get(service);
    if (ret == null) {
        PluginEntry pe = entryMap.get(service);
        if (pe == null) {
            return null;
        }
        if (pe.plugin != null) {
            ret = pe.plugin;
        } else {
            ret = instantiatePlugin(pe.pluginClass);
        }
        ret.privateInitialize(ctx, app, app.getPreferences());
        pluginMap.put(service, ret);
    }
    return ret;
}
 
Example 2
Source File: PluginManager.java    From IoTgo_Android_App with MIT License 6 votes vote down vote up
/**
 * Get the plugin object that implements the service.
 * If the plugin object does not already exist, then create it.
 * If the service doesn't exist, then return null.
 *
 * @param service       The name of the service.
 * @return              CordovaPlugin or null
 */
public CordovaPlugin getPlugin(String service) {
    CordovaPlugin ret = pluginMap.get(service);
    if (ret == null) {
        PluginEntry pe = entryMap.get(service);
        if (pe == null) {
            return null;
        }
        if (pe.plugin != null) {
            ret = pe.plugin;
        } else {
            ret = instantiatePlugin(pe.pluginClass);
        }
        ret.privateInitialize(ctx, app, app.getPreferences());
        pluginMap.put(service, ret);
    }
    return ret;
}
 
Example 3
Source File: PluginManager.java    From bluemix-parking-meter with MIT License 6 votes vote down vote up
/**
 * Get the plugin object that implements the service.
 * If the plugin object does not already exist, then create it.
 * If the service doesn't exist, then return null.
 *
 * @param service       The name of the service.
 * @return              CordovaPlugin or null
 */
public CordovaPlugin getPlugin(String service) {
    CordovaPlugin ret = pluginMap.get(service);
    if (ret == null) {
        PluginEntry pe = entryMap.get(service);
        if (pe == null) {
            return null;
        }
        if (pe.plugin != null) {
            ret = pe.plugin;
        } else {
            ret = instantiatePlugin(pe.pluginClass);
        }
        ret.privateInitialize(ctx, app, app.getPreferences());
        pluginMap.put(service, ret);
    }
    return ret;
}
 
Example 4
Source File: PluginManager.java    From reader with MIT License 6 votes vote down vote up
/**
 * Get the plugin object that implements the service.
 * If the plugin object does not already exist, then create it.
 * If the service doesn't exist, then return null.
 *
 * @param service       The name of the service.
 * @return              CordovaPlugin or null
 */
public CordovaPlugin getPlugin(String service) {
    CordovaPlugin ret = pluginMap.get(service);
    if (ret == null) {
        PluginEntry pe = entryMap.get(service);
        if (pe == null) {
            return null;
        }
        if (pe.plugin != null) {
            ret = pe.plugin;
        } else {
            ret = instantiatePlugin(pe.pluginClass);
        }
        ret.privateInitialize(ctx, app, app.getPreferences());
        pluginMap.put(service, ret);
    }
    return ret;
}
 
Example 5
Source File: PluginManager.java    From reader with MIT License 6 votes vote down vote up
/**
 * Get the plugin object that implements the service.
 * If the plugin object does not already exist, then create it.
 * If the service doesn't exist, then return null.
 *
 * @param service       The name of the service.
 * @return              CordovaPlugin or null
 */
public CordovaPlugin getPlugin(String service) {
    CordovaPlugin ret = pluginMap.get(service);
    if (ret == null) {
        PluginEntry pe = entryMap.get(service);
        if (pe == null) {
            return null;
        }
        if (pe.plugin != null) {
            ret = pe.plugin;
        } else {
            ret = instantiatePlugin(pe.pluginClass);
        }
        ret.privateInitialize(ctx, app, app.getPreferences());
        pluginMap.put(service, ret);
    }
    return ret;
}
 
Example 6
Source File: PluginManager.java    From crosswalk-cordova-android with Apache License 2.0 6 votes vote down vote up
/**
 * Get the plugin object that implements the service.
 * If the plugin object does not already exist, then create it.
 * If the service doesn't exist, then return null.
 *
 * @param service       The name of the service.
 * @return              CordovaPlugin or null
 */
public CordovaPlugin getPlugin(String service) {
    CordovaPlugin ret = pluginMap.get(service);
    if (ret == null) {
        PluginEntry pe = entryMap.get(service);
        if (pe == null) {
            return null;
        }
        if (pe.plugin != null) {
            ret = pe.plugin;
        } else {
            ret = instantiatePlugin(pe.pluginClass);
        }
        ret.privateInitialize(ctx, app, app.getPreferences());
        pluginMap.put(service, ret);
    }
    return ret;
}