org.apache.cordova.CordovaPlugin#onOverrideUrlLoading ( )源码实例Demo

下面列出了org.apache.cordova.CordovaPlugin#onOverrideUrlLoading ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: L.TileLayer.Cordova   文件: PluginManager.java
/**
 * Called when the URL of the webview changes.
 *
 * @param url               The URL that is being changed to.
 * @return                  Return false to allow the URL to load, return true to prevent the URL from loading.
 */
public boolean onOverrideUrlLoading(String url) {
    // Deprecated way to intercept URLs. (process <url-filter> tags).
    // Instead, plugins should not include <url-filter> and instead ensure
    // that they are loaded before this function is called (either by setting
    // the onload <param> or by making an exec() call to them)
    for (PluginEntry entry : this.entryMap.values()) {
        List<String> urlFilters = urlMap.get(entry.service);
        if (urlFilters != null) {
            for (String s : urlFilters) {
                if (url.startsWith(s)) {
                    return getPlugin(entry.service).onOverrideUrlLoading(url);
                }
            }
        } else {
            CordovaPlugin plugin = pluginMap.get(entry.service);
            if (plugin != null && plugin.onOverrideUrlLoading(url)) {
                return true;
            }
        }
    }
    return false;
}
 
源代码2 项目: IoTgo_Android_App   文件: PluginManager.java
/**
 * Called when the URL of the webview changes.
 *
 * @param url               The URL that is being changed to.
 * @return                  Return false to allow the URL to load, return true to prevent the URL from loading.
 */
public boolean onOverrideUrlLoading(String url) {
    // Deprecated way to intercept URLs. (process <url-filter> tags).
    // Instead, plugins should not include <url-filter> and instead ensure
    // that they are loaded before this function is called (either by setting
    // the onload <param> or by making an exec() call to them)
    for (PluginEntry entry : this.entryMap.values()) {
        List<String> urlFilters = urlMap.get(entry.service);
        if (urlFilters != null) {
            for (String s : urlFilters) {
                if (url.startsWith(s)) {
                    return getPlugin(entry.service).onOverrideUrlLoading(url);
                }
            }
        } else {
            CordovaPlugin plugin = pluginMap.get(entry.service);
            if (plugin != null && plugin.onOverrideUrlLoading(url)) {
                return true;
            }
        }
    }
    return false;
}
 
源代码3 项目: bluemix-parking-meter   文件: PluginManager.java
/**
 * Called when the URL of the webview changes.
 *
 * @param url               The URL that is being changed to.
 * @return                  Return false to allow the URL to load, return true to prevent the URL from loading.
 */
public boolean onOverrideUrlLoading(String url) {
    // Deprecated way to intercept URLs. (process <url-filter> tags).
    // Instead, plugins should not include <url-filter> and instead ensure
    // that they are loaded before this function is called (either by setting
    // the onload <param> or by making an exec() call to them)
    for (PluginEntry entry : this.entryMap.values()) {
        List<String> urlFilters = urlMap.get(entry.service);
        if (urlFilters != null) {
            for (String s : urlFilters) {
                if (url.startsWith(s)) {
                    return getPlugin(entry.service).onOverrideUrlLoading(url);
                }
            }
        } else {
            CordovaPlugin plugin = pluginMap.get(entry.service);
            if (plugin != null && plugin.onOverrideUrlLoading(url)) {
                return true;
            }
        }
    }
    return false;
}
 
源代码4 项目: reader   文件: PluginManager.java
/**
 * Called when the URL of the webview changes.
 *
 * @param url               The URL that is being changed to.
 * @return                  Return false to allow the URL to load, return true to prevent the URL from loading.
 */
public boolean onOverrideUrlLoading(String url) {
    // Deprecated way to intercept URLs. (process <url-filter> tags).
    // Instead, plugins should not include <url-filter> and instead ensure
    // that they are loaded before this function is called (either by setting
    // the onload <param> or by making an exec() call to them)
    for (PluginEntry entry : this.entryMap.values()) {
        List<String> urlFilters = urlMap.get(entry.service);
        if (urlFilters != null) {
            for (String s : urlFilters) {
                if (url.startsWith(s)) {
                    return getPlugin(entry.service).onOverrideUrlLoading(url);
                }
            }
        } else {
            CordovaPlugin plugin = pluginMap.get(entry.service);
            if (plugin != null && plugin.onOverrideUrlLoading(url)) {
                return true;
            }
        }
    }
    return false;
}
 
源代码5 项目: reader   文件: PluginManager.java
/**
 * Called when the URL of the webview changes.
 *
 * @param url               The URL that is being changed to.
 * @return                  Return false to allow the URL to load, return true to prevent the URL from loading.
 */
public boolean onOverrideUrlLoading(String url) {
    // Deprecated way to intercept URLs. (process <url-filter> tags).
    // Instead, plugins should not include <url-filter> and instead ensure
    // that they are loaded before this function is called (either by setting
    // the onload <param> or by making an exec() call to them)
    for (PluginEntry entry : this.entryMap.values()) {
        List<String> urlFilters = urlMap.get(entry.service);
        if (urlFilters != null) {
            for (String s : urlFilters) {
                if (url.startsWith(s)) {
                    return getPlugin(entry.service).onOverrideUrlLoading(url);
                }
            }
        } else {
            CordovaPlugin plugin = pluginMap.get(entry.service);
            if (plugin != null && plugin.onOverrideUrlLoading(url)) {
                return true;
            }
        }
    }
    return false;
}
 
源代码6 项目: cordova-amazon-fireos   文件: PluginManager.java
/**
 * Called when the URL of the webview changes.
 *
 * @param url               The URL that is being changed to.
 * @return                  Return false to allow the URL to load, return true to prevent the URL from loading.
 */
public boolean onOverrideUrlLoading(String url) {
    // Deprecated way to intercept URLs. (process <url-filter> tags).
    // Instead, plugins should not include <url-filter> and instead ensure
    // that they are loaded before this function is called (either by setting
    // the onload <param> or by making an exec() call to them)
    for (PluginEntry entry : this.entryMap.values()) {
        List<String> urlFilters = urlMap.get(entry.service);
        if (urlFilters != null) {
            for (String s : urlFilters) {
                if (url.startsWith(s)) {
                    Log.d(TAG,"onOverrideUrlLoading()");
                    return getPlugin(entry.service).onOverrideUrlLoading(url);
                }
            }
        } else {
            CordovaPlugin plugin = pluginMap.get(entry.service);
            if (plugin != null && plugin.onOverrideUrlLoading(url)) {
                return true;
            }
        }
    }
    return false;
}
 
源代码7 项目: crosswalk-cordova-android   文件: PluginManager.java
/**
 * Called when the URL of the webview changes.
 *
 * @param url               The URL that is being changed to.
 * @return                  Return false to allow the URL to load, return true to prevent the URL from loading.
 */
public boolean onOverrideUrlLoading(String url) {
    // Deprecated way to intercept URLs. (process <url-filter> tags).
    // Instead, plugins should not include <url-filter> and instead ensure
    // that they are loaded before this function is called (either by setting
    // the onload <param> or by making an exec() call to them)
    for (PluginEntry entry : this.entryMap.values()) {
        List<String> urlFilters = urlMap.get(entry.service);
        if (urlFilters != null) {
            for (String s : urlFilters) {
                if (url.startsWith(s)) {
                    return getPlugin(entry.service).onOverrideUrlLoading(url);
                }
            }
        } else {
            CordovaPlugin plugin = pluginMap.get(entry.service);
            if (plugin != null && plugin.onOverrideUrlLoading(url)) {
                return true;
            }
        }
    }
    return false;
}