|
你好,我在一个service里面这样写代码,但是收不到任何anychat的回调函数
public class ChatService extends Service implements AnyChatBaseEvent,AnyChatPrivateChatEvent
{
...
public void initSDK(){
if (anychat == null) {
anychat = new AnyChatCoreSDK();
anychat.SetBaseEvent(this);
configEntity = ConfigService.LoadConfig(this);
if (configEntity.useARMv6Lib != 0)
AnyChatCoreSDK.SetSDKOptionInt(
AnyChatDefine.BRAC_SO_CORESDK_USEARMV6LIB, 1);
anychat.InitSDK(android.os.Build.VERSION.SDK_INT, 0);
anychat.ChangeChatMode(1);// 开启私聊模式
anychat.SetPrivateChatEvent(this);
}
configEntity.resolution_width = 640;
configEntity.resolution_height = 480;
ConfigService.SaveConfig(this, configEntity);
anychat.Connect("demo.anychat.cn", configEntity.port);
new Thread(new Runnable() {
public void run() {
anychat.Login(username,"");
}
}).start();
}
@Override
public void OnAnyChatLoginMessage(int dwUserId, int dwErrorCode) {
//这个回调一直收不到,其他的也收不到...
}
}
麻烦看一下,谢谢了
|
|