AnyChat技术支持论坛

标题: 在activity中设置收到文字消息回调,当activity中的fragment切换后,收不到文字消息 [打印本页]

作者: rainyday    时间: 2016-3-8 14:20
标题: 在activity中设置收到文字消息回调,当activity中的fragment切换后,收不到文字消息
在activity中设置收到文字消息回调AnyChatTextMsgEvent,刚开始文字消息可以正常接收,当activity中的fragment切换后,收不到文字消息。
作者: 佰锐科技-苏晴    时间: 2016-3-8 14:25
您好,麻烦您把日志发上来分析下,谢谢!
作者: rainyday    时间: 2016-3-8 14:39
佰锐科技-苏晴 发表于 2016-3-8 14:25
您好,麻烦您把日志发上来分析下,谢谢!

sd卡中的日志?里面不是只记录了视频和音频聊天的么
作者: 佰锐科技-苏晴    时间: 2016-3-8 14:59
是的。里面还有其他信息的。
作者: rainyday    时间: 2016-3-8 15:02
佰锐科技-苏晴 发表于 2016-3-8 14:59
是的。里面还有其他信息的。

[2016-03-08 14:21:40(063)]        ---------------------------AnyChat Platform Core SDK Client Log---------------------------
[2016-03-08 14:21:40(065)]        Load libanychatcore.so success!(V5.3 Build Time:Aug 10 2015 05:31:49)
[2016-03-08 14:21:40(066)]        Android OS SDK Version:19, Support ARMv7:2, Support Neon:4
[2016-03-08 14:21:40(096)]        Load libmediautil_v7.so success!(V5.3 Build Time:Aug 10 2015 05:32:58)
[2016-03-08 14:21:40(120)]        Load libmediashow.so success!(V5.3 Build Time:Aug 10 2015 05:32:42)
[2016-03-08 14:21:40(133)]        Load libmediacore.so success!(V5.3 Build Time:Aug 10 2015 05:32:44)
[2016-03-08 14:21:40(136)]        MX3(Meizu) exynos5  4.4.4
[2016-03-08 14:21:40(138)]        Invoke        Connect(IP,PORT)=0
[2016-03-08 14:21:40(149)]        Invoke        LoginServer(username=434)
[2016-03-08 14:21:40(180)]        CheckClientSocketLink         Connect(ip=,port=)
[2016-03-08 14:21:40(216)]        Apply video parameter:1920x1280, bitrate:1000kbps, quality:4, gop:40, fps:25, preset:3, codec:0
[2016-03-08 14:21:40(217)]        Invoke        SetSDKOption(BRAC_SO_NETWORK_P2PPOLITIC=1)
[2016-03-08 14:21:40(217)]        Invoke        SetSDKOption(BRAC_SO_AUDIO_ECHOCTRL,1)
[2016-03-08 14:21:40(218)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_USEHWCODEC=0)
[2016-03-08 14:21:40(313)]        Server version: V5.3(Build Time:2015-08-05 16:29:45, Server OS:Windows)
[2016-03-08 14:21:40(396)]        Message        OnConnect(bSuccess:1, errorcode=0)
[2016-03-08 14:21:40(852)]        Message        OnLoginSystem(userid=434,errorcode=0,username=434), msg deliver worked(0)
[2016-03-08 14:21:40(853)]        Server running time: 0 days, 4 hours, 33 minutes, license mode:0
[2016-03-08 14:21:40(915)]        Connection to streaming media server successfully!(udp delay:31ms)
[2016-03-08 14:21:41(113)]        Invoke        EnterRoom(roomid=2203)
[2016-03-08 14:21:41(343)]        Message        OnEnterRoom(roomid=2203,errorcode=0,siteindex=0)
[2016-03-08 14:21:41(344)]        Audio Playback Device Init(0, 1, 16000, 16), Default Playback Driver
[2016-03-08 14:21:41(345)]        Message        OnReceiveOnlineUser(count=1,roomid=2203)
[2016-03-08 14:21:41(529)]        Invoke        UserSpeakControl(userid=261,bOpen=1)
[2016-03-08 14:21:41(531)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
[2016-03-08 14:21:41(573)]        Invoke        SetInputAudioFormat(1, 16000, 16, flags:0)
[2016-03-08 14:21:41(573)]        Audio Init, error:0, device:-1, 1, 16000, 16, capmode:0
[2016-03-08 14:21:41(574)]        Audio codec init, handle:1, 11, 1, 16000, 16, 15850
[2016-03-08 14:21:41(673)]        Audio FX Status: VAD:1, NS:1, AGC:1, AEC:1
[2016-03-08 14:21:42(792)]        Message        OnUserEnterRoom(userid=261,nickname=261,siteindex=1)
[2016-03-08 14:21:42(806)]        Invoke        UserSpeakControl(userid=261,bOpen=1)
[2016-03-08 14:21:42(808)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
[2016-03-08 14:21:42(966)]        userid(261) audio decode, codec:11, 1 channel, 16000Hz
[2016-03-08 14:21:45(130)]        Message        OnP2PConnectState(userid=261, state=1)
[2016-03-08 14:21:45(462)]        Message        OnP2PConnectState(userid=261, state=3)
[2016-03-08 14:21:46(848)]        On Remote UserCameraControl(dwUserId:261, bOpen:1)
[2016-03-08 14:21:46(881)]        On Remote UserSpeakControl(dwUserId:261, bOpen:1)
[2016-03-08 14:21:51(616)]        Invoke        UserSpeakControl(userid=-1,bOpen=0)
[2016-03-08 14:21:51(622)]        Invoke        UserCameraControl(userid=261, bOpen=0, stream=0)
[2016-03-08 14:21:51(945)]        Invoke        UserCameraControl(userid=261, bOpen=1, stream=0)
[2016-03-08 14:21:51(946)]        Invoke        UserSpeakControl(userid=261,bOpen=1)
[2016-03-08 14:21:51(955)]        Invoke        UserCameraControl(userid=-1, bOpen=1, stream=0)
[2016-03-08 14:21:51(956)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
[2016-03-08 14:21:51(958)]        Invoke        UserCameraControl(userid=261, bOpen=1, stream=0)
[2016-03-08 14:21:51(958)]        Invoke        UserSpeakControl(userid=261,bOpen=1)
[2016-03-08 14:21:51(961)]        Invoke        UserCameraControl(userid=-1, bOpen=1, stream=0)
[2016-03-08 14:21:51(962)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
[2016-03-08 14:21:52(295)]        userid(261) video decode, codec:1, 320x240, delay:24ms
[2016-03-08 14:21:52(904)]        APPLOG        Camera Preview size: 1280 x 960
[2016-03-08 14:21:52(906)]        APPLOG        Camera Preview size: 1280 x 720
[2016-03-08 14:21:52(907)]        APPLOG        Camera Preview size: 1024 x 768
[2016-03-08 14:21:52(908)]        APPLOG        Camera Preview size: 800 x 600
[2016-03-08 14:21:52(908)]        APPLOG        Camera Preview size: 720 x 480
[2016-03-08 14:21:52(909)]        APPLOG        Camera Preview size: 640 x 480
[2016-03-08 14:21:52(911)]        APPLOG        Camera Preview size: 320 x 240
[2016-03-08 14:21:52(912)]        APPLOG        Camera FrameRate: 12000 , 30000
[2016-03-08 14:21:53(184)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
[2016-03-08 14:21:53(185)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
[2016-03-08 14:21:53(185)]        video init finish:320x240, NV21, fps:30, codecid:1
[2016-03-08 14:21:53(342)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
[2016-03-08 14:21:53(345)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
[2016-03-08 14:21:53(346)]        video init finish:320x240, NV21, fps:30, codecid:1
[2016-03-08 14:21:53(363)]        Invoke        SetInputAudioFormat(1, 16000, 16, flags:0)
[2016-03-08 14:21:53(363)]        Audio Init, error:0, device:-1, 1, 16000, 16, capmode:0
[2016-03-08 14:21:53(367)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
[2016-03-08 14:21:53(370)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
[2016-03-08 14:21:53(371)]        video init finish:320x240, NV21, fps:30, codecid:1
[2016-03-08 14:21:53(438)]        video codec init:codec:1, 25fps, 320x240, bitrate:1000kbps, quality:4, preset:3, gop:40, handle:4
[2016-03-08 14:22:11(440)]        Invoke        UserCameraControl(userid=-1, bOpen=0, stream=0)
[2016-03-08 14:22:11(471)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=0)
[2016-03-08 14:22:16(605)]        Invoke        UserCameraControl(userid=261, bOpen=1, stream=0)
[2016-03-08 14:22:16(606)]        Invoke        UserSpeakControl(userid=261,bOpen=1)
[2016-03-08 14:22:16(609)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
[2016-03-08 14:22:26(704)]        Invoke        UserCameraControl(userid=261, bOpen=1, stream=0)
[2016-03-08 14:22:26(705)]        Invoke        UserSpeakControl(userid=261,bOpen=1)
[2016-03-08 14:22:26(729)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
[2016-03-08 14:22:33(397)]        APPLOG        Camera Preview size: 1280 x 960
[2016-03-08 14:22:33(400)]        APPLOG        Camera Preview size: 1280 x 720
[2016-03-08 14:22:33(402)]        APPLOG        Camera Preview size: 1024 x 768
[2016-03-08 14:22:33(403)]        APPLOG        Camera Preview size: 800 x 600
[2016-03-08 14:22:33(404)]        APPLOG        Camera Preview size: 720 x 480
[2016-03-08 14:22:33(405)]        APPLOG        Camera Preview size: 640 x 480
[2016-03-08 14:22:33(406)]        APPLOG        Camera Preview size: 320 x 240
[2016-03-08 14:22:33(407)]        APPLOG        Camera FrameRate: 12000 , 30000
[2016-03-08 14:22:33(684)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
[2016-03-08 14:22:33(685)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
[2016-03-08 14:22:33(686)]        video init finish:320x240, NV21, fps:30, codecid:1
[2016-03-08 14:22:33(778)]        Invoke        UserCameraControl(userid=-1, bOpen=1, stream=0)
[2016-03-08 14:22:34(797)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
[2016-03-08 14:22:34(801)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
[2016-03-08 14:22:34(801)]        video init finish:320x240, NV21, fps:30, codecid:1
[2016-03-08 14:22:34(858)]        video codec init:codec:1, 25fps, 320x240, bitrate:1000kbps, quality:4, preset:3, gop:40, handle:5
[2016-03-08 14:23:33(798)]        Invoke        UserCameraControl(userid=261, bOpen=1, stream=0)
[2016-03-08 14:23:33(799)]        Invoke        UserSpeakControl(userid=261,bOpen=1)
[2016-03-08 14:23:33(801)]        Invoke        UserCameraControl(userid=-1, bOpen=1, stream=0)
[2016-03-08 14:23:33(802)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
[2016-03-08 14:23:34(751)]        APPLOG        Camera Preview size: 1280 x 960
[2016-03-08 14:23:34(752)]        APPLOG        Camera Preview size: 1280 x 720
[2016-03-08 14:23:34(753)]        APPLOG        Camera Preview size: 1024 x 768
[2016-03-08 14:23:34(754)]        APPLOG        Camera Preview size: 800 x 600
[2016-03-08 14:23:34(755)]        APPLOG        Camera Preview size: 720 x 480
[2016-03-08 14:23:34(756)]        APPLOG        Camera Preview size: 640 x 480
[2016-03-08 14:23:34(757)]        APPLOG        Camera Preview size: 320 x 240
[2016-03-08 14:23:34(760)]        APPLOG        Camera FrameRate: 12000 , 30000
[2016-03-08 14:23:35(039)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
[2016-03-08 14:23:35(046)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
[2016-03-08 14:23:35(046)]        video init finish:320x240, NV21, fps:30, codecid:1
[2016-03-08 14:23:35(132)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
[2016-03-08 14:23:35(135)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
[2016-03-08 14:23:35(135)]        video init finish:320x240, NV21, fps:30, codecid:1
[2016-03-08 14:23:35(329)]        video codec init:codec:1, 25fps, 320x240, bitrate:1000kbps, quality:4, preset:3, gop:40, handle:6
[2016-03-08 14:23:39(514)]        Invoke        UserCameraControl(userid=-1, bOpen=0, stream=0)
[2016-03-08 14:23:39(535)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=0)
[2016-03-08 14:23:41(593)]        Invoke        UserCameraControl(userid=261, bOpen=1, stream=0)
[2016-03-08 14:23:41(593)]        Invoke        UserSpeakControl(userid=261,bOpen=1)
[2016-03-08 14:23:41(599)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
[2016-03-08 14:23:49(278)]        Invoke        UserCameraControl(userid=261, bOpen=1, stream=0)
[2016-03-08 14:23:49(279)]        Invoke        UserSpeakControl(userid=261,bOpen=1)
[2016-03-08 14:23:49(446)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
[2016-03-08 14:23:55(312)]        APPLOG        Camera Preview size: 1280 x 960
[2016-03-08 14:23:55(314)]        APPLOG        Camera Preview size: 1280 x 720
[2016-03-08 14:23:55(315)]        APPLOG        Camera Preview size: 1024 x 768
[2016-03-08 14:23:55(316)]        APPLOG        Camera Preview size: 800 x 600
[2016-03-08 14:23:55(317)]        APPLOG        Camera Preview size: 720 x 480
[2016-03-08 14:23:55(320)]        APPLOG        Camera Preview size: 640 x 480
[2016-03-08 14:23:55(321)]        APPLOG        Camera Preview size: 320 x 240
[2016-03-08 14:23:55(322)]        APPLOG        Camera FrameRate: 12000 , 30000
[2016-03-08 14:23:55(591)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
[2016-03-08 14:23:55(592)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
[2016-03-08 14:23:55(593)]        video init finish:320x240, NV21, fps:30, codecid:1
[2016-03-08 14:23:55(594)]        Invoke        UserCameraControl(userid=-1, bOpen=1, stream=0)
[2016-03-08 14:23:56(357)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
[2016-03-08 14:23:56(360)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
[2016-03-08 14:23:56(361)]        video init finish:320x240, NV21, fps:30, codecid:1
[2016-03-08 14:23:56(409)]        video codec init:codec:1, 25fps, 320x240, bitrate:1000kbps, quality:4, preset:3, gop:40, handle:7
[2016-03-08 14:25:17(630)]        Invoke        UserCameraControl(userid=-1, bOpen=0, stream=0)
[2016-03-08 14:25:17(650)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=0)
[2016-03-08 14:25:21(625)]        Invoke        UserCameraControl(userid=261, bOpen=1, stream=0)
[2016-03-08 14:25:21(626)]        Invoke        UserSpeakControl(userid=261,bOpen=1)
[2016-03-08 14:25:21(630)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
[2016-03-08 14:25:30(744)]        Invoke        UserCameraControl(userid=261, bOpen=1, stream=0)
[2016-03-08 14:25:30(745)]        Invoke        UserSpeakControl(userid=261,bOpen=1)
[2016-03-08 14:25:30(747)]        Invoke        UserSpeakControl(userid=-1,bOpen=1)
[2016-03-08 14:25:37(993)]        APPLOG        Camera Preview size: 1280 x 960
[2016-03-08 14:25:37(995)]        APPLOG        Camera Preview size: 1280 x 720
[2016-03-08 14:25:37(996)]        APPLOG        Camera Preview size: 1024 x 768
[2016-03-08 14:25:38(000)]        APPLOG        Camera Preview size: 800 x 600
[2016-03-08 14:25:38(002)]        APPLOG        Camera Preview size: 720 x 480
[2016-03-08 14:25:38(004)]        APPLOG        Camera Preview size: 640 x 480
[2016-03-08 14:25:38(005)]        APPLOG        Camera Preview size: 320 x 240
[2016-03-08 14:25:38(007)]        APPLOG        Camera FrameRate: 12000 , 30000
[2016-03-08 14:25:38(287)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
[2016-03-08 14:25:38(289)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
[2016-03-08 14:25:38(290)]        video init finish:320x240, NV21, fps:30, codecid:1
[2016-03-08 14:25:38(291)]        Invoke        UserCameraControl(userid=-1, bOpen=1, stream=0)
[2016-03-08 14:25:39(155)]        Invoke        SetSDKOption(BRAC_SO_CORESDK_EXTVIDEOINPUT=1)
[2016-03-08 14:25:39(158)]        Invoke        SetInputVideoFormat(pixfmt:8, 320x240, 30fps, flags:0)
[2016-03-08 14:25:39(159)]        video init finish:320x240, NV21, fps:30, codecid:1
[2016-03-08 14:25:39(207)]        video codec init:codec:1, 25fps, 320x240, bitrate:1000kbps, quality:4, preset:3, gop:40, handle:8
[2016-03-08 14:26:53(587)]        Invoke        LeaveRoom(roomid=-1)        Elapse:119 ms
[2016-03-08 14:26:53(606)]        Invoke        LogoutServer(userid=434)        Elapse:18 ms
[2016-03-08 14:26:53(622)]        Invoke        BRAC_Release        Elapse:15 ms

log.zip

2.03 KB, 下载次数: 0


作者: 佰锐科技-邵光清    时间: 2016-3-8 16:10
您好,SetTextMessageEvent最后是在哪里设置接收的?
作者: rainyday    时间: 2016-3-8 16:17
佰锐科技-邵光清 发表于 2016-3-8 16:10
您好,SetTextMessageEvent最后是在哪里设置接收的?

就只有在activity中设置了一次。
作者: 佰锐科技-邵光清    时间: 2016-3-8 17:06
rainyday 发表于 2016-3-8 16:17
就只有在activity中设置了一次。

您好,这个跟activity生命周期有关,试试在onRestart中添加SetTextMessageEvent。




欢迎光临 AnyChat技术支持论坛 (http://bbs.anychat.cn/) Powered by Discuz! X3