Use polling instead of XHR for callbacks from Java to JavaScript when device has a proxy set.

This commit is contained in:
Bryce Curtis
2010-10-26 15:09:54 -05:00
parent f63b8140af
commit bc1e039ea1
3 changed files with 75 additions and 8 deletions
+3 -3
View File
@@ -99,7 +99,7 @@ public abstract class Plugin implements IPlugin {
* @param statement
*/
public void sendJavascript(String statement) {
this.ctx.callbackServer.sendJavascript(statement);
this.ctx.sendJavascript(statement);
}
/**
@@ -113,7 +113,7 @@ public abstract class Plugin implements IPlugin {
* @param callbackId The callback id used when calling back into JavaScript.
*/
public void success(PluginResult pluginResult, String callbackId) {
this.ctx.callbackServer.sendJavascript(pluginResult.toSuccessCallbackString(callbackId));
this.ctx.sendJavascript(pluginResult.toSuccessCallbackString(callbackId));
}
/**
@@ -123,6 +123,6 @@ public abstract class Plugin implements IPlugin {
* @param callbackId The callback id used when calling back into JavaScript.
*/
public void error(PluginResult pluginResult, String callbackId) {
this.ctx.callbackServer.sendJavascript(pluginResult.toErrorCallbackString(callbackId));
this.ctx.sendJavascript(pluginResult.toErrorCallbackString(callbackId));
}
}