Set PhoneGap.UsePolling flag based upon result from CallbackServer.

This commit is contained in:
Bryce Curtis 2011-06-07 14:18:18 -05:00
parent 8da5ad8eca
commit 315b5a59b3

View File

@ -344,10 +344,13 @@ PhoneGap.Channel.join(function() {
} }
else { else {
var polling = prompt("usePolling", "gap_callbackServer:"); var polling = prompt("usePolling", "gap_callbackServer:");
PhoneGap.UsePolling = polling;
if (polling == "true") { if (polling == "true") {
PhoneGap.UsePolling = true;
PhoneGap.JSCallbackPolling(); PhoneGap.JSCallbackPolling();
} }
else { else {
PhoneGap.UsePolling = false;
PhoneGap.JSCallback(); PhoneGap.JSCallback();
} }
} }