Update the POLL command's documentation
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 31 Jul 2013 05:24:13 +0000 (08:24 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 31 Jul 2013 05:25:46 +0000 (08:25 +0300)
res/values/strings.xml
src/ro/ieval/fonbot/FonBotMainService.java
src/ro/ieval/fonbot/Heavy.java

index e49e617de03bd05160e08d111cbb3a69ea3fe3aa..27e9ac6e8e524c20e749f7276bacf04888434953 100644 (file)
@@ -146,11 +146,9 @@ The help command can be used to get a list of commands and help for them. Exampl
     <string name="wifi_off">Wifi: off</string>
     <string name="enabling_wifi">Enabling wifi…</string>
     <string name="disabling_wifi">Disabling wifi…</string>
-    <string name="polling_server">Polling server…</string>
-    <string name="polling_stopped">Polling stopped</string>
+    <string name="starting_long_polling_if_stopped">Starting long polling if stopped…</string>
     <string name="command_disabled">Command %s disabled</string>
     <string name="command_enabled">Command %s enabled</string>
-    <string name="polling_every_milliseconds">Polling every %d milliseconds</string>
     <string name="incoming_message">Incoming message from %1$s: \"%2$s\" sent at %3$s</string>
     <string name="outgoing_message">Outgoing message to %1$s: \"%2$s\" sent at %3$s</string>
     <string name="error_writing_to_socket">Error writing to socket: %s</string>
@@ -197,10 +195,9 @@ The help command can be used to get a list of commands and help for them. Exampl
                Example: wipe data
     </string>
     <string name="poll_help">
-        Usage: poll [ms]\n
-               With no arguments, polls the server once\n
-               With an argument, starts polling the server every &lt;ms&gt; milliseconds. If &lt;ms&gt; 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
     </string>
     <string name="contacts_help">
         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
     </string>
     <string name="location_tracking_is_active">Location tracking is active</string>
-    <string name="the_polling_service_is_running">The polling service is running</string>
     <string name="cancel">Cancel</string>
     <string name="command_sent">Command sent</string>
     <string name="could_not_parse_id">Could not parse id</string>
index 13dc1316449a081c7e656eea6679e606955d44e1..8e8d67a0c535806b89f0e37a6eed6d46503dfe47 100644 (file)
@@ -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
         *
index fadf42c7f40184c9bc818507d0378d9d20aafc46..14b729deffd84d35f22a8cd3fcc32b31e7ece370 100644 (file)
@@ -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));
        }
 
This page took 0.0141 seconds and 4 git commands to generate.