I continue with a connection to server. I have succesfully added XMPP library to my Xamarin.Android project, but when I try to make a simple connection:
using (var cl = new XmppClient(hostname,username,password))
{
cl.Connect();
Console.WriteLine("Contacts on " + cl.Jid.Node + "'s contact-list:");
foreach (var item in cl.GetRoster())
Console.WriteLine(" - " + item.Jid);
}
this case occure:
09-25 12:37:14.713 I/mono-stdout( 2821): _xmpp-client._tcp.jabbim.cz 2454 IN SRV 20 0 5222 lb2-hap.jabbim.cz
|--- Name _xmpp-client._tcp.jabbim.cz
09-25 12:37:14.717 I/mono-stdout( 2821): |--- Name _xmpp-client._tcp.jabbim.cz
|--- Port: 5222
09-25 12:37:14.721 I/mono-stdout( 2821): |--- Port: 5222
09-25 12:37:14.729 I/mono-stdout( 2821): |--- Priority20
|--- Priority20
09-25 12:37:14.741 I/mono-stdout( 2821): |--- Type Srv
|--- Type Srv
|--- Target: lb2-hap.jabbim.cz
09-25 12:37:14.765 I/mono-stdout( 2821): |--- Target: lb2-hap.jabbim.cz
_xmpp-client._tcp.jabbim.cz 2454 IN SRV 10 0 5222 lb1-hap.jabbim.cz
09-25 12:37:14.773 I/mono-stdout( 2821): _xmpp-client._tcp.jabbim.cz 2454 IN SRV 10 0 5222 lb1-hap.jabbim.cz
|--- Name _xmpp-client._tcp.jabbim.cz
09-25 12:37:14.781 I/mono-stdout( 2821): |--- Name _xmpp-client._tcp.jabbim.cz
|--- Port: 5222
09-25 12:37:14.781 I/mono-stdout( 2821): |--- Port: 5222
|--- Priority10
09-25 12:37:14.785 I/mono-stdout( 2821): |--- Priority10
09-25 12:37:14.789 I/mono-stdout( 2821): |--- Type Srv
|--- Type Srv
|--- Target: lb1-hap.jabbim.cz
09-25 12:37:14.797 I/mono-stdout( 2821): |--- Target: lb1-hap.jabbim.cz
09-25 12:37:15.457 D/Mono ( 2821): Assembly Ref addref System.Xml[0xb7c5d400] -> System[0xb7c24320]: 7
09-25 12:37:16.033 D/Mono ( 2821): DllImport attempting to load: '/system/lib/liblog.so'.
09-25 12:37:16.057 D/Mono ( 2821): DllImport loaded library '/system/lib/liblog.so'.
09-25 12:37:16.057 D/Mono ( 2821): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
09-25 12:37:16.057 D/Mono ( 2821): Searching for '__android_log_print'.
09-25 12:37:16.065 D/Mono ( 2821): Probing '__android_log_print'.
09-25 12:37:16.065 D/Mono ( 2821): Found as '__android_log_print'.
09-25 12:37:16.085 I/MonoDroid( 2821): UNHANDLED EXCEPTION:
09-25 12:37:16.085 I/MonoDroid( 2821): Sharp.Xmpp.XmppDisconnectionException: Unrecoverable stream error: host-unknown
09-25 12:37:16.093 I/MonoDroid( 2821): at Sharp.Xmpp.Core.StreamParser.NextElement (string[]) <IL 0x0015d, 0x00713>
09-25 12:37:16.093 I/MonoDroid( 2821): at Sharp.Xmpp.Core.XmppCore.InitiateStream (string) <IL 0x000b5, 0x002eb>
09-25 12:37:16.093 I/MonoDroid( 2821): at Sharp.Xmpp.Core.XmppCore.SetupConnection (string) <IL 0x00007, 0x00053>
09-25 12:37:16.097 I/MonoDroid( 2821): at Sharp.Xmpp.Core.XmppCore.Connect (string) <IL 0x0004f, 0x001bf>
09-25 12:37:16.097 I/MonoDroid( 2821): at Sharp.Xmpp.Im.XmppIm.Connect (string) <IL 0x00078, 0x002b7>
09-25 12:37:16.101 I/MonoDroid( 2821): at Sharp.Xmpp.Client.XmppClient.Connect (string) <IL 0x00007, 0x00033>
It seems something is missing in a configuration. Thanks a lot for reply.