I read some examples and tested them but all of them need to start a chat with someone first to receive Incoming Messages... I want to retrieve this Incoming Messages without need to talk first to the jid anyone can give an example ?
You need to register a ChatListener to be notified of new chats, then you can add a message listener to them like normal:
connection.getChatManager().addChatListener(new ChatManagerListenerImpl());
....
private class ChatManagerListenerImpl implements ChatManagerListener {
/** {@inheritDoc} */
@Override
public void chatCreated(final Chat chat, final boolean createdLocally) {
chat.addMessageListener(...);
}
}