I started to write some application using Google Cloud Messaging, but I have problem with the server. I used code from Android Developer side - Java sample using the Smack library (I will not upload code here, because it is quite long):
GCM Cloud connection Server (XMPP)
I have turn on Google Cloud Messaging on Google Apis and I changed my SENDER_ID, API KEY and Registration_ID, but when I start the program I have errors like this:
gcm.googleapis.com:5235 Exception: XMPPError connecting to gcm.googleapis.com:5235.; : remote-server-error(502)
at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:604)
at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1026)
at SmackCcsClient.connect(SmackCcsClient.java:248)
at SmackCcsClient.main(SmackCcsClient.java:342)
Exception in thread "main" java.lang.IllegalStateException: Not connected to server.
at org.jivesoftware.smack.XMPPConnection.sendPacket(XMPPConnection.java:495)
at SmackCcsClient.send(SmackCcsClient.java:132)
at SmackCcsClient.main(SmackCcsClient.java:357)
SmackCcsClient.java:248 -> `connection.connect();`
SmackCcsClient.java:342 -> `ccsClient.connect(userName, password);`
SmackCcsClient.java:132 -> `connection.sendPacket(request);`
SmackCcsClient.java:357 -> `ccsClient.send(createJsonMessage(toRegId, messageId, payload, collapseKey,timeToLive, delayWhileIdle));`
Maybe you know what I done wrong?