keine Antwort empfangen Während Gruppe Erstellen ich eine Ausnahme erhalten: Empfangen SmackException $ NoResponseException „SmackException $ NoResponseException: keine Antwort innerhalb Antwort erhalten“kann nicht MultiUserChat mit Smack erstellen: in Antwort
Dies ist die Gruppe create Methode mit einer Antwortzeit von 50sec. Ich bin in der Lage, Login, eins zu eins Chat. Aber beim Versuch, eine Gruppe zu erstellen, die die folgende Ausnahme auf muc.create (Nick) erhält;
public void createGroup() {
String roomId = "Group_test003" + "@iscoveri.com";
String nick = "Grouptest";
try {
manager = MultiUserChatManager.getInstanceFor(xmppCON);
MultiUserChat muc = manager.getMultiUserChat(roomId);
muc.create(nick);
Form form = muc.getConfigurationForm();
Form submitForm = form.createAnswerForm();
List<FormField> fields = form.getFields();
for (int i = 0; i < fields.size(); i++) {
FormField field = (FormField) fields.get(i);
if (!FormField.Type.hidden.equals(field.getType()) && field.getVariable() != null) {
submitForm.setDefaultAnswer(field.getVariable());
}
}
List owners = new ArrayList();
owners.add("8017037677" + "@iscoveri.com");
submitForm.setAnswer("muc#roomconfig_roomowners", owners);
muc.sendConfigurationForm(submitForm);
} catch (XMPPException e) {
e.printStackTrace();
} catch (SmackException.NoResponseException e) {
e.printStackTrace();
} catch (SmackException.NotConnectedException e) {
e.printStackTrace();
} catch (SmackException e) {
e.printStackTrace();
}
}
Das ist nicht möglich, wenn 'muc.create (nick);' timeouts first. –
@Haroldo_OK setzt ein höheres Timeout, Standard ist 3s, Sie können es mit 15 versuchen – MrPk