From: Marius Gavrilescu Date: Wed, 31 Jul 2013 05:24:13 +0000 (+0300) Subject: Update the POLL command's documentation X-Git-Tag: 0.000_001~11 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=1b6a04801bb78479f9d010cc1d5d8fcca089e013;p=fonbot.git Update the POLL command's documentation --- diff --git a/res/values/strings.xml b/res/values/strings.xml index e49e617..27e9ac6 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -146,11 +146,9 @@ The help command can be used to get a list of commands and help for them. Exampl Wifi: off Enabling wifi… Disabling wifi… - Polling server… - Polling stopped + Starting long polling if stopped… Command %s disabled Command %s enabled - Polling every %d milliseconds Incoming message from %1$s: \"%2$s\" sent at %3$s Outgoing message to %1$s: \"%2$s\" sent at %3$s Error writing to socket: %s @@ -197,10 +195,9 @@ The help command can be used to get a list of commands and help for them. Exampl Example: wipe data - Usage: poll [ms]\n - With no arguments, polls the server once\n - With an argument, starts polling the server every <ms> milliseconds. If <ms> is 0, the polling is stopped\n - Example: poll 60000 + Usage: poll\n + Starts the long polling service if it is stopped\n + Example: poll Usage: contacts substring\n @@ -439,7 +436,6 @@ The help command can be used to get a list of commands and help for them. Exampl Example: shutdown Location tracking is active - The polling service is running Cancel Command sent Could not parse id diff --git a/src/ro/ieval/fonbot/FonBotMainService.java b/src/ro/ieval/fonbot/FonBotMainService.java index 13dc131..8e8d67a 100644 --- a/src/ro/ieval/fonbot/FonBotMainService.java +++ b/src/ro/ieval/fonbot/FonBotMainService.java @@ -94,8 +94,7 @@ public final class FonBotMainService extends Service { * Broadcast action: remove an ongoing event */ public static final String ACTION_DELETE_ONGOING="ro.ieval.fonbot.FonBotMainService.ACTION_DELETE_ONGOING"; - /** Broadcast action: trigger a server poll */ - public static final String ACTION_TRIGGER_POLL="ro.ieval.fonbot.FonBotMainService.ACTION_TRIGGER_POLL"; + /** * Extra: ongoing event id * diff --git a/src/ro/ieval/fonbot/Heavy.java b/src/ro/ieval/fonbot/Heavy.java index fadf42c..14b729d 100644 --- a/src/ro/ieval/fonbot/Heavy.java +++ b/src/ro/ieval/fonbot/Heavy.java @@ -1654,13 +1654,13 @@ final class Heavy { } /** - * Poll the server for pending commands. + * Start long polling if stopped * * @param context Context instance * @param replyTo reply Address */ public static void poll(final Context context, final Address replyTo) { - Utils.sendMessage(context, replyTo, polling_server); + Utils.sendMessage(context, replyTo, starting_long_polling_if_stopped); context.startService(new Intent(context, FonBotMainService.class)); }