Quantcast
Channel: Ignite Realtime: Message List
Viewing all articles
Browse latest Browse all 11593

Unable to do a basic connect using latest 4.1 beta version

$
0
0

Getting this error

 

W/AbstractXMPPConnection﹕ Connection closed with error

    org.jivesoftware.smack.SmackException: Parser got END_DOCUMENT event. This could happen e.g. if the server closed the connection without sending a closing stream element

            at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPC onnection.java:1107)

            at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$200(XMPPTCPCon nection.java:896)

            at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnecti on.java:911)

            at java.lang.Thread.run(Thread.java:818)

 

 

 

XMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()

                    .setHost("talk.google.com")

                    .setServiceName("gmail.com")

                    .setCompressionEnabled(false).build();

            XMPPTCPConnection connection = new XMPPTCPConnection(config);

            try {

                connection.connect();

            } catch (XMPPException e) {

                e.printStackTrace();

            } catch (SmackException e) {

                e.printStackTrace();

            } catch (IOException e) {

                e.printStackTrace();

            }

 

 

            connection.addConnectionListener(new ConnectionListener() {

                @Override

                public void connected(XMPPConnection connection) {

                    Log.d("ARUN SHANKAR SMACK ", "connected");

                }

 

 

                @Override

                public void authenticated(XMPPConnection connection, boolean resumed) {

                    Log.d("ARUN SHANKAR SMACK ", "authenticated");

                }

 

 

                @Override

                public void connectionClosed() {

                    Log.d("ARUN SHANKAR SMACK ", "connection closed");

                }

 

 

                @Override

                public void connectionClosedOnError(Exception e) {

                    Log.d("ARUN SHANKAR SMACK ", "connection closed on error");

                }

 

 

                @Override

                public void reconnectionSuccessful() {

                    Log.d("ARUN SHANKAR SMACK ", "reconnected");

                }

 

 

                @Override

                public void reconnectingIn(int seconds) {

                    Log.d("ARUN SHANKAR SMACK ", "reconnecting");

                }

 

 

                @Override

                public void reconnectionFailed(Exception e) {

                    Log.d("ARUN SHANKAR SMACK ", "reconnecting failed");

                }

            });


Viewing all articles
Browse latest Browse all 11593

Trending Articles