Java 类org.apache.cordova.ConfigXmlParser 实例源码

项目:syng-client    文件:SettingsActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setupSimplePreferencesScreen();

    Preference button = (Preference)findPreference("clearCache");
    button.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
        @Override
        public boolean onPreferenceClick(Preference preference) {

            ConfigXmlParser parser = new ConfigXmlParser();
            parser.parse(SettingsActivity.this);
            CordovaPreferences preferences = parser.getPreferences();
            preferences.setPreferencesBundle(SettingsActivity.this.getIntent().getExtras());
            CordovaWebView webView = new CordovaWebViewImpl(CordovaWebViewImpl.createEngine(SettingsActivity.this, preferences));
            webView.clearCache();
            return true;
        }
    });
}
项目:keemob    文件:EmbeddedWebViewActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    //Set up the webview
    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(this);

    SystemWebView webView = (SystemWebView) findViewById(R.id.cordovaWebView);
    webInterface = new CordovaWebViewImpl(new SystemWebViewEngine(webView));
    webInterface.init(cordovaInterface, parser.getPluginEntries(), parser.getPreferences());

    webView.loadUrl(parser.getLaunchUrl());
}
项目:localcloud_fe    文件:HotCodePushPlugin.java   
/**
 * Getter for the startup page.
 *
 * @return startup page relative path
 */
private String getStartingPage() {
    if (!TextUtils.isEmpty(startingPage)) {
        return startingPage;
    }

    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(cordova.getActivity());
    String url = parser.getLaunchUrl();

    startingPage = url.replace(LOCAL_ASSETS_FOLDER, "");

    return startingPage;
}
项目:localcloud_fe    文件:EmbeddedWebViewActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    //Set up the webview
    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(this);

    SystemWebView webView = (SystemWebView) findViewById(R.id.cordovaWebView);
    webInterface = new CordovaWebViewImpl(new SystemWebViewEngine(webView));
    webInterface.init(cordovaInterface, parser.getPluginEntries(), parser.getPreferences());

    webView.loadUrl(parser.getLaunchUrl());
}
项目:localcloud_fe    文件:HotCodePushPlugin.java   
/**
 * Getter for the startup page.
 *
 * @return startup page relative path
 */
private String getStartingPage() {
    if (!TextUtils.isEmpty(startingPage)) {
        return startingPage;
    }

    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(cordova.getActivity());
    String url = parser.getLaunchUrl();

    startingPage = url.replace(LOCAL_ASSETS_FOLDER, "");

    return startingPage;
}
项目:localcloud_fe    文件:HotCodePushPlugin.java   
/**
 * Getter for the startup page.
 *
 * @return startup page relative path
 */
private String getStartingPage() {
    if (!TextUtils.isEmpty(startingPage)) {
        return startingPage;
    }

    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(cordova.getActivity());
    String url = parser.getLaunchUrl();

    startingPage = url.replace(LOCAL_ASSETS_FOLDER, "");

    return startingPage;
}
项目:PreCogSecurity.github.io    文件:EmbeddedWebViewActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    //Set up the webview
    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(this);

    SystemWebView webView = (SystemWebView) findViewById(R.id.cordovaWebView);
    webInterface = new CordovaWebViewImpl(new SystemWebViewEngine(webView));
    webInterface.init(cordovaInterface, parser.getPluginEntries(), parser.getPreferences());

    webView.loadUrl(parser.getLaunchUrl());
}
项目:cordova-jsbackgroundservice    文件:WebViewService.java   
@SuppressWarnings("deprecation")
protected void loadConfig() {
    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(this);
    preferences = parser.getPreferences();
    pluginEntries = parser.getPluginEntries();
}
项目:cordova-hot-code-push    文件:HotCodePushPlugin.java   
/**
 * Getter for the startup page.
 *
 * @return startup page relative path
 */
private String getStartingPage() {
    if (!TextUtils.isEmpty(startingPage)) {
        return startingPage;
    }

    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(cordova.getActivity());
    String url = parser.getLaunchUrl();

    startingPage = url.replace(LOCAL_ASSETS_FOLDER, "");

    return startingPage;
}
项目:syng-client    文件:WebViewFragment.java   
@SuppressWarnings("deprecation")
protected void loadConfig() {
    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(getActivity());
    preferences = parser.getPreferences();
    preferences.setPreferencesBundle(getActivity().getIntent().getExtras());
    //preferences.set("webview", "io.syng.cordova.plugin.WebViewEngine");
    pluginEntries = parser.getPluginEntries();
    Config.init(getActivity());
}
项目:radioflow    文件:EmbeddedWebViewActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    //Set up the webview
    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(this);

    SystemWebView webView = (SystemWebView) findViewById(R.id.cordovaWebView);
    webInterface = new CordovaWebViewImpl(new SystemWebViewEngine(webView));
    webInterface.init(cordovaInterface, parser.getPluginEntries(), parser.getPreferences());

    webView.loadUrl(parser.getLaunchUrl());
}
项目:reacteu-app    文件:CodePush.java   
private String getConfigLaunchUrl() {
    ConfigXmlParser parser = new ConfigXmlParser();
    parser.parse(this.cordova.getActivity());
    return parser.getLaunchUrl();
}