This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void LoginToChat(final String _jid, final String _password, final String _userid) | |
{ | |
UiApplication.getUiApplication().invokeLater(new Runnable() | |
{ | |
public void run() | |
{ | |
jidName = _jid; | |
String jid = ""; | |
String password = ""; | |
String server = SERVER; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Method sends and gets messages | |
public void run() { | |
try { | |
if (chat_manager.currentConversation.isMulti) { | |
vman.add(new SeparatorField()); | |
GroupChat chat = | |
(GroupChat)Datas.multichat.get(chat_manager.currentConversation.name); | |
vman.add(new LabelField("Room Members:")); | |
if (chat != null) { | |
for (int j = 0; j < chat.jids.size(); j++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (field == bOnline) { | |
if (chat_manager.internal_state != chat_manager.OFFLINE && | |
chat_manager.internal_state != chat_manager.WAIT_CONNECT && Datas.jid != null) { | |
Presence.changePresence(Presence.getPresence("online"), | |
Datas.jid.status_message); | |
Datas.jid.setPresence(Presence.getPresence("online"), | |
Datas.jid.status_message); | |
chat_manager.getGuiOnlineMenu(); | |
} | |
} else if (field == bAway) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chat_manager.internal_state = chat_manager.ONLINE; | |
boolean changes = false; // test if there are changes | |
boolean onlyphone = false; | |
boolean isNew = true; | |
if (chat_manager.currentjid == null || | |
!jid.getText().equals(chat_manager.currentjid.getFullJid()) || | |
!group.getText().equals(chat_manager.currentjid.group) || (phone.getText() != null && | |
!phone.getText().equals(chat_manager.currentjid.phone))) { | |
if (chat_manager.currentjid != null && | |
jid.getText().equals(chat_manager.currentjid.getFullJid()) && |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make request | |
public void doRequest(int type) | |
{ | |
switch(type) | |
{ | |
// Create session request | |
case REQUEST_SESSION: | |
{ | |
String time = new Long(new Date().getTime()).toString(); | |
String timestamp = time.substring(0, time.length()-3); |
NewerOlder