¡@

Home 

2014/10/16 ¤W¤È 08:26:49

android Programming Glossary: twohalfs

XMPP with Java Asmack library supporting X-FACEBOOK-PLATFORM

http://stackoverflow.com/questions/5317329/xmpp-with-java-asmack-library-supporting-x-facebook-platform

byte data StringBuilder buf new StringBuilder int len data.length for int i 0 i len i int halfByte data i 4 0xF int twoHalfs 0 do if 0 halfByte halfByte 9 buf.append char '0' halfByte else buf.append char 'a' halfByte 10 halfByte data.. halfByte 9 buf.append char '0' halfByte else buf.append char 'a' halfByte 10 halfByte data i 0xF while twoHalfs 1 return buf.toString And this is the communication with the server with the sent and received messages PM SENT 1132418216.. byte data StringBuilder buf new StringBuilder int len data.length for int i 0 i len i int halfByte data i 4 0xF int twoHalfs 0 do if 0 halfByte halfByte 9 buf.append char '0' halfByte else buf.append char 'a' halfByte 10 halfByte data..

Problems with connecting to Facebook XMMP MD5-DIGEST

http://stackoverflow.com/questions/8532328/problems-with-connecting-to-facebook-xmmp-md5-digest

data StringBuilder buf new StringBuilder int len data.length for int i 0 i len i int halfByte data i 4 0xF int twoHalfs 0 do if 0 halfByte halfByte 9 buf.append char '0' halfByte else buf.append char 'a' halfByte 10 .. 9 buf.append char '0' halfByte else buf.append char 'a' halfByte 10 halfByte data i 0xF while twoHalfs 1 return buf.toString To use it ConnectionConfiguration config new ConnectionConfiguration chat.facebook.com 5222 config.setSASLAuthenticationEnabled..