我已经尝试了将Facebook与XMPP连接起来的所有事情,但我一直只遇到一个错误:
SASL身份验证失败使用机制DIGEST-MD5
我正在实现以下方法来执行此任务:
public class MySASLDigestMD5Mechanism extends SASLMechanism {
public MySASLDigestMD5Mechanism(SASLAuthentication saslAuthentication) {
super(saslAuthentication);
}
protected void authenticate() throws IOException, XMPPException {
String[] mechanisms = { getName() };
Map<String, String> props = new HashMap<String, String>();
sc = Sasl.createSaslClient(mechanisms, null, "xmpp", hostname, props, this);
super.authenticate();
}
public void authenticate(String username, String host, String password) throws IOException, XMPPException {
this.authenticationId = username;
this.password = password;
this.hostname = host;
String[] mechanisms = { getName() };
Map<String,String> props = new HashMap<String,String>();
sc = Sasl.createSaslClient(mechanisms, …Run Code Online (Sandbox Code Playgroud) 如何将使用lwuit库的J2ME应用程序转换为android apk?
我尝试使用mircoemulator转换,但是当我启动应用程序时,它显示错误并退出.