Java Code Examples for org.apache.cordova.PluginEntry#createPlugin()

The following examples show how to use org.apache.cordova.PluginEntry#createPlugin() . 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 phonegapbootcampsite with MIT License 5 votes vote down vote up
/**
 * Create plugins objects that have onload set.
 */
public void startupPlugins() {
    for (PluginEntry entry : this.entries.values()) {
        if (entry.onload) {
            entry.createPlugin(this.app, this.ctx);
        }
    }
}
 
Example 2
Source File: PluginManager.java    From phonegapbootcampsite with MIT License 5 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) {
    PluginEntry entry = this.entries.get(service);
    if (entry == null) {
        return null;
    }
    CordovaPlugin plugin = entry.plugin;
    if (plugin == null) {
        plugin = entry.createPlugin(this.app, this.ctx);
    }
    return plugin;
}
 
Example 3
Source File: PluginManager.java    From CordovaYoutubeVideoPlayer with MIT License 5 votes vote down vote up
/**
 * Create plugins objects that have onload set.
 */
public void startupPlugins() {
    for (PluginEntry entry : this.entries.values()) {
        if (entry.onload) {
            entry.createPlugin(this.app, this.ctx);
        }
    }
}
 
Example 4
Source File: PluginManager.java    From CordovaYoutubeVideoPlayer with MIT License 5 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) {
    PluginEntry entry = this.entries.get(service);
    if (entry == null) {
        return null;
    }
    CordovaPlugin plugin = entry.plugin;
    if (plugin == null) {
        plugin = entry.createPlugin(this.app, this.ctx);
    }
    return plugin;
}
 
Example 5
Source File: PluginManager.java    From wildfly-samples with MIT License 5 votes vote down vote up
/**
 * Create plugins objects that have onload set.
 */
public void startupPlugins() {
    for (PluginEntry entry : this.entries.values()) {
        if (entry.onload) {
            entry.createPlugin(this.app, this.ctx);
        }
    }
}
 
Example 6
Source File: PluginManager.java    From wildfly-samples with MIT License 5 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) {
    PluginEntry entry = this.entries.get(service);
    if (entry == null) {
        return null;
    }
    CordovaPlugin plugin = entry.plugin;
    if (plugin == null) {
        plugin = entry.createPlugin(this.app, this.ctx);
    }
    return plugin;
}
 
Example 7
Source File: PluginManager.java    From phonegap-plugin-loading-spinner with Apache License 2.0 5 votes vote down vote up
/**
 * Create plugins objects that have onload set.
 */
public void startupPlugins() {
    for (PluginEntry entry : this.entries.values()) {
        if (entry.onload) {
            entry.createPlugin(this.app, this.ctx);
        }
    }
}
 
Example 8
Source File: PluginManager.java    From phonegap-plugin-loading-spinner with Apache License 2.0 5 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) {
    PluginEntry entry = this.entries.get(service);
    if (entry == null) {
        return null;
    }
    CordovaPlugin plugin = entry.plugin;
    if (plugin == null) {
        plugin = entry.createPlugin(this.app, this.ctx);
    }
    return plugin;
}