Клиент XMPP не может подключиться к серверу gtalk в Android - PullRequest
0 голосов
/ 09 февраля 2012

Я использую пример XMPP с этого адреса. Я настраиваю следующую конфигурацию для клиента XMMP

Host     gtalk.google.com port 5222
Service  gmail.com

Но он не может подключиться к серверу gatlk. Я получаю следующее исключение:

02-09 E/AndroidRuntime(301): Uncaught handler: thread main exiting due to uncaught exception
02-09 22:16:15.541: D/dalvikvm(301): GC freed 6905 objects / 312000 bytes in 102ms
02-09 22:16:15.541: E/AndroidRuntime(301): java.lang.IllegalStateException: Not connected to server.
02-09 22:16:15.541: E/AndroidRuntime(301):  at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:329)
02-09 22:16:15.541: E/AndroidRuntime(301):  at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:301)
02-09 22:16:15.541: E/AndroidRuntime(301):  at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:283)
02-09 22:16:15.541: E/AndroidRuntime(301):  at org.apache.android.xmpp.SettingsDialog.onClick(SettingsDialog.java:54)
02-09 22:16:15.541: E/AndroidRuntime(301):  at android.view.View.performClick(View.java:2364)
02-09 22:16:15.541: E/AndroidRuntime(301):  at android.view.View.onTouchEvent(View.java:4179)
02-09 22:16:15.541: E/AndroidRuntime(301):  at android.widget.TextView.onTouchEvent(TextView.java:6541)
02-09 22:16:15.541: E/AndroidRuntime(301):  at android.view.View.dispatchTouchEvent(View.java:3709)
02-09 22:16:15.541: E/AndroidRuntime(301):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
02-09 22:16:15.541: E/AndroidRuntime(301):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
02-09 22:16:15.541: E/AndroidRuntime(301):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
02-09 22:16:15.541: E/AndroidRuntime(301):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
02-09 22:16:15.541: E/AndroidRuntime(301):  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
02-09 22:16:15.541: E/AndroidRuntime(301):  at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
02-09 22:16:15.541: E/AndroidRuntime(301):  at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
02-09 22:16:15.541: E/AndroidRuntime(301):  at android.app.Dialog.dispatchTouchEvent(Dialog.java:643)
02-09 22:16:15.541: E/AndroidRuntime(301):  at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
02-09 22:16:15.541: E/AndroidRuntime(301):  at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
02-09 22:16:15.541: E/AndroidRuntime(301):  at android.os.Handler.dispatchMessage(Handler.java:99)
02-09 22:16:15.541: E/AndroidRuntime(301):  at android.os.Looper.loop(Looper.java:123)
02-09 22:16:15.541: E/AndroidRuntime(301):  at android.app.ActivityThread.main(ActivityThread.java:4363)
02-09 22:16:15.541: E/AndroidRuntime(301):  at java.lang.reflect.Method.invokeNative(Native Method)
02-09 22:16:15.541: E/AndroidRuntime(301):  at java.lang.reflect.Method.invoke(Method.java:521)
02-09 22:16:15.541: E/AndroidRuntime(301):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
02-09 22:16:15.541: E/AndroidRuntime(301):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
02-09 22:16:15.541: E/AndroidRuntime(301):  at dalvik.system.NativeStart.main(Native Method)
02-09 22:16:15.561: I/dalvikvm(301): threadid=7: reacting to signal 3
02-09 22:16:15.821: I/dalvikvm(301): Wrote stack trace to '/data/anr/traces.txt'

1 Ответ

0 голосов
/ 27 февраля 2012

Вы пробовали "talk.google.com" в качестве имени хоста. http://code.google.com/apis/talk/open_communications.html

...