<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>
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 <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
</string>
<string name="contacts_help">
Usage: contacts substring\n
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>
* 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
*
}
/**
- * 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));
}