Ejemplo n.º 1
0
  public void setStatusFromConfig() {
    CarbonManager.getInstanceFor(extXMPPConnection)
        .sendCarbonsEnabled(configuration.messageCarbons);

    Presence presence = new Presence(Presence.Type.available);
    Mode mode = Mode.valueOf(configuration.statusMode);
    presence.setMode(mode);
    presence.setStatus(configuration.statusMessage);
    presence.setPriority(configuration.priority);
    extXMPPConnection.sendPacket(presence);
    configuration.presence_required = false;
  }
Ejemplo n.º 2
0
  public void setStatusFromConfig() {
    // TODO: only call this when carbons changed, not on every presence change
    CarbonManager.getInstanceFor(mXMPPConnection).sendCarbonsEnabled(mConfig.messageCarbons);

    Presence presence = new Presence(Presence.Type.available);
    Mode mode = Mode.valueOf(mConfig.statusMode);
    presence.setMode(mode);
    presence.setStatus(mConfig.statusMessage);
    presence.setPriority(mConfig.priority);
    mXMPPConnection.sendPacket(presence);
    mConfig.presence_required = false;
  }