Exemplo n.º 1
0
 /**
  * This method presents the user with possible candidates, when the user given contact information
  * is not distinct enough, so that there are more possible contacts that match these informations.
  * This is a quite common task, so it has its own method.
  *
  * @param candidates
  */
 protected void askForMoreDetails(ResolvedContact[] candidates) {
   XmppMsg msg = new XmppMsg(getString(R.string.chat_specify_details));
   msg.newLine();
   for (ResolvedContact rc : candidates) {
     msg.appendLine(rc.getName() + " - " + rc.getNumber());
   }
   send(msg);
 }
Exemplo n.º 2
0
  /**
   * Sends the help messages from the current command to the user, does nothing if there are no help
   * messages available
   */
  protected final void sendHelp() {
    String[] help = help();
    if (help == null) {
      return;
    }

    XmppMsg msg = new XmppMsg();
    msg.addStringArray(help);
    send(msg);
  }
Exemplo n.º 3
0
 protected String makeBold(String msg) {
   return XmppMsg.makeBold(msg);
 }