Ejemplo n.º 1
0
  public void unsubscribe(String topic) {

    if (androidClient.isConnected()) {
      try {
        androidClient.unsubscribe(topic);
      } catch (MqttException err) {
        Log.i(DEBUG_TAG, err.getLocalizedMessage());
      }
    } else {
      Log.i(DEBUG_TAG, "Could not unsubscribe. Client is not connected. Please connect first.");
    }
  }