From 6c65a6a016bd75c2bb569a9fae7bf0a6c30d4fd7 Mon Sep 17 00:00:00 2001 From: Bryce Curtis Date: Mon, 11 Jul 2011 22:56:20 -0500 Subject: [PATCH] Make sure we load the correct resource id for plugins.xml. --- framework/src/com/phonegap/api/PluginManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/framework/src/com/phonegap/api/PluginManager.java b/framework/src/com/phonegap/api/PluginManager.java index 4af3ffb3ee..8bcdb7565c 100755 --- a/framework/src/com/phonegap/api/PluginManager.java +++ b/framework/src/com/phonegap/api/PluginManager.java @@ -49,7 +49,8 @@ public PluginManager(WebView app, PhonegapActivity ctx) { * Load plugins from res/xml/plugins.xml */ public void loadPlugins() { - XmlResourceParser xml = ctx.getResources().getXml(com.phonegap.R.xml.plugins); + int id = ctx.getResources().getIdentifier("plugins", "xml", ctx.getPackageName()); + XmlResourceParser xml = ctx.getResources().getXml(id); int eventType = -1; while (eventType != XmlResourceParser.END_DOCUMENT) { if (eventType == XmlResourceParser.START_TAG) { @@ -57,7 +58,7 @@ public void loadPlugins() { if (strNode.equals("plugin")) { String name = xml.getAttributeValue(null, "name"); String value = xml.getAttributeValue(null, "value"); - System.out.println("Plugin: "+name+" => "+value); + //System.out.println("Plugin: "+name+" => "+value); this.addService(name, value); } }