Kakao i Connect Live 커뮤니티

안드로이드 close 질문입니다

안녕하세요. 일레븐 테크놀로지입니다.

현상과 질문거리에대해 말씀드릴께요.

현상 : 첫 연결은 잘되나, 종료후 다시 연결하면 connect 상태에서 완료상태로 넘어가지 않음.
절차 :
activity를 finish 하여 remon.close 와 onDestroy 까지 확인되는 상태로 첫 연결 종료

종료후 블루투스나 이어폰등은 사용하지 않는데 ServiceConnection android.bluetooth.BluetoothHeadset 라는 에러가 뜸

I/MIN: onStop
I/MIN: onDestroy
D/ConnectivityManager.CallbackHandler: CM callback handler got msg 524292
E/ActivityThread: Activity kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall has leaked ServiceConnection android.bluetooth.BluetoothHeadset$2@eef149f that was originally bound here
android.app.ServiceConnectionLeaked: Activity kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall has leaked ServiceConnection android.bluetooth.BluetoothHeadset$2@eef149f that was originally bound here
at android.app.LoadedApk$ServiceDispatcher.(LoadedApk.java:1134)
at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:1028)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:2155)
at android.app.ContextImpl.bindServiceAsUser(ContextImpl.java:2145)
at android.content.ContextWrapper.bindServiceAsUser(ContextWrapper.java:566)
at android.bluetooth.BluetoothHeadset.doBind(BluetoothHeadset.java:304)
at android.bluetooth.BluetoothHeadset.(BluetoothHeadset.java:297)
at android.bluetooth.BluetoothAdapter.getProfileProxy(BluetoothAdapter.java:1808)
at com.remon.remondroid.core.BluetoothHeadsetManager.start(BluetoothHeadsetManager.java:85)
at com.remon.remondroid.core.AppRTCAudioManager.init(AppRTCAudioManager.java:254)
at com.remon.remondroid.core.MediaManager.createAudioManager(MediaManager.java:78)
at com.remon.remondroid.Remon.(Remon.java:67)
at kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall.createPlayRTCInstance(ActVideoCall.java:1142)
at kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall.onCreate(ActVideoCall.java:259)
at android.app.Activity.performCreate(Activity.java:6288)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)

에러는 무시하고
재접속 시도 시 oncreate 부터 init wait connect 상태 변화까진 도달하나(양쪽 채널은 같음을 확인), 완료 상태에 가지 않고 finish, close, onDestory까지 종료 상태가 되나 아래와 같이 remon.close를 했음에도 불구하고

I/WebRtcAudioManager: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5) 로그가 계속 뜨는것으로 보아
webRtcAudioManager가 계속 살아있는거라 추측

I/MIN: finish
E/ViewRootImpl: sendUserActionEvent() mView == null
I/MIN: onPause
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@b52c1c1 time:29094149
I/EglRenderer: EglRenderer: remote_video_view: Duration: 4001 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: 0.0. Average render time: NA. Average swapBuffer time: NA.
I/MIN: onStop
I/MIN: onDestroy
E/ActivityThread: Activity kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall has leaked IntentReceiver com.remon.remondroid.core.AppRTCAudioManager$3@3008c3fe that was originally registered here. Are you missing a call to unregisterReceiver()?
android.app.IntentReceiverLeaked: Activity kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall has leaked IntentReceiver com.remon.remondroid.core.AppRTCAudioManager$3@3008c3fe that was originally registered here. Are you missing a call to unregisterReceiver()?
at android.app.LoadedApk$ReceiverDispatcher.(LoadedApk.java:960)
at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:761)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:2015)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1995)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1989)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:503)
at com.remon.remondroid.core.AppRTCAudioManager.registerForWiredHeadsetIntentBroadcast(AppRTCAudioManager.java:375)
at com.remon.remondroid.core.AppRTCAudioManager.init(AppRTCAudioManager.java:249)
at com.remon.remondroid.core.MediaManager.createAudioManager(MediaManager.java:78)
at com.remon.remondroid.Remon.(Remon.java:67)
at kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall.createPlayRTCInstance(ActVideoCall.java:1142)
at kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall.onCreate(ActVideoCall.java:259)
at android.app.Activity.performCreate(Activity.java:6288)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
E/ActivityThread: Activity kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall has leaked ServiceConnection android.bluetooth.BluetoothHeadset$2@33e7075f that was originally bound here
android.app.ServiceConnectionLeaked: Activity kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall has leaked ServiceConnection android.bluetooth.BluetoothHeadset$2@33e7075f that was originally bound here
at android.app.LoadedApk$ServiceDispatcher.(LoadedApk.java:1134)
at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:1028)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:2155)
at android.app.ContextImpl.bindServiceAsUser(ContextImpl.java:2145)
at android.content.ContextWrapper.bindServiceAsUser(ContextWrapper.java:566)
at android.bluetooth.BluetoothHeadset.doBind(BluetoothHeadset.java:304)
at android.bluetooth.BluetoothHeadset.(BluetoothHeadset.java:297)
at android.bluetooth.BluetoothAdapter.getProfileProxy(BluetoothAdapter.java:1808)
at com.remon.remondroid.core.BluetoothHeadsetManager.start(BluetoothHeadsetManager.java:85)
at com.remon.remondroid.core.AppRTCAudioManager.init(AppRTCAudioManager.java:254)
at com.remon.remondroid.core.MediaManager.createAudioManager(MediaManager.java:78)
at com.remon.remondroid.Remon.(Remon.java:67)
at kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall.createPlayRTCInstance(ActVideoCall.java:1142)
at kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall.onCreate(ActVideoCall.java:259)
at android.app.Activity.performCreate(Activity.java:6288)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
I/EglRenderer: EglRenderer: remote_video_view: Duration: 4004 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: 0.0. Average render time: NA. Average swapBuffer time: NA.
D/ActVideoCall: onStateChange CLOSE,mLocalChannelID:null
I/EglRenderer: EglRenderer: local_video_view: Releasing.
I/EglRenderer: EglRenderer: local_video_view: Already released
I/EglRenderer: EglRenderer: remote_video_view: Releasing.
I/EglRenderer: EglRenderer: remote_video_view: eglBase detach and release.
I/EglRenderer: EglRenderer: remote_video_view: Releasing done.
D/AppRTCAudioManager: close
W/System.err: java.lang.IllegalArgumentException: Receiver not registered: com.remon.remondroid.core.AppRTCAudioManager$3@3008c3fe
W/System.err: at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:822)
W/System.err: at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:2038)
W/System.err: at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:528)
W/System.err: at com.remon.remondroid.core.AppRTCAudioManager.unregisterForWiredHeadsetIntentBroadcast(AppRTCAudioManager.java:381)
W/System.err: at com.remon.remondroid.core.AppRTCAudioManager.close(AppRTCAudioManager.java:264)
W/System.err: at com.remon.remondroid.core.MediaManager.close(MediaManager.java:311)
W/System.err: at com.remon.remondroid.RemonContext.close(RemonContext.java:105)
W/System.err: at com.remon.remondroid.network.WebSocketClientHandler.channelRead0(WebSocketClientHandler.java:178)
W/System.err: at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351)
W/System.err: at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351)
W/System.err: at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
W/System.err: at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351)
W/System.err: at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
W/System.err: at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
W/System.err: at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
W/System.err: at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:651)
W/System.err: at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:536)
W/System.err: at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:490)
W/System.err: at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:450)
W/System.err: at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)
W/System.err: at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
W/System.err: at java.lang.Thread.run(Thread.java:818)
D/ActVideoCall: onStateChange FAIL,mLocalChannelID:null
I/System.out: WebSocket Client disconnected!
I/EglRenderer: EglRenderer: remote_video_view: Quitting render thread.
I/WebRtcAudioManager: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/WebRtcAudioManager: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/WebRtcAudioManager: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/WebRtcAudioManager: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/WebRtcAudioManager: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
I/System.out: KnoxVpnUidStorageknoxVpnSupported API value returned is false
I/WebRtcAudioManager: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/WebRtcAudioManager: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)

close에서 뭔가 소스를 제거하지 않는것이 있는것인지… close할때 유의점이 따로 있는것인지 잘 모르겠습니다.
질문이 이상하거나 하면 연락 한번 주세요^^

그럼 수고하세요.

답변이 늦어서 죄송해요. 말씀하신 close처리를 꼼꼼히 하였습니다. 멀티채널 연결을 지원하다가 생긴 최근의 실수였습니다. 0.2.5 버전을 새로 받으세요.

에스디케이 버전 다시 내려간건가요?
오늘은 다시 0.2.4로 쓰여 있어서

아닙니다. 0.2.5버전을 사용하시면 됩니다.

여전히 무엇이 문제인지 잘 파악이 안되네요… 혹시 몰라 워닝혹은 에러 로그를 추가 하겠습니다.
클라이언트쪽은 별 메시지는 없고, 방 생성 하는쪽에만 메시지가 올라오네요.

업그레이드 진행후에, 처음 종료 할때

D/ActVideoCall: onStateChange CLOSE,mLocalChannelID:null 이후, Fail상태까지 넘어옴니다.
아래와 같은 메시지가 뜹니다. 강제종료는 당하지 않는 상태입니다.

I/AppRTCAudioManager: streamMaxVolume(MUSIC):15
I/AppRTCAudioManager: streamMaxVolume(ALARM):15
W/System.err: java.lang.IllegalStateException: Wrong thread
W/System.err: at org.webrtc.ThreadUtils$ThreadChecker.checkIsOnValidThread(ThreadUtils.java:33)
W/System.err: at com.remon.remondroid.core.AppRTCProximitySensor.stop(AppRTCProximitySensor.java:78)
W/System.err: at com.remon.remondroid.core.AppRTCAudioManager.close(AppRTCAudioManager.java:274)
W/System.err: at com.remon.remondroid.core.MediaManager.close(MediaManager.java:311)
W/System.err: at com.remon.remondroid.RemonContext.close(RemonContext.java:105)
W/System.err: at com.remon.remondroid.network.WebSocketClientHandler.channelRead0(WebSocketClientHandler.java:178)
W/System.err: at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351)
W/System.err: at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351)
W/System.err: at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
W/System.err: at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:280)
W/System.err: at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:396)
W/System.err: at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351)
W/System.err: at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
W/System.err: at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
W/System.err: at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
W/System.err: at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:651)
W/System.err: at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:536)
W/System.err: at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:490)
W/System.err: at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:450)
W/System.err: at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)
W/System.err: at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
W/System.err: at java.lang.Thread.run(Thread.java:818)
D/ActVideoCall: onStateChange FAIL,mLocalChannelID:video_unse_-95483680
I/System.out: WebSocket Client disconnected!
I/EglRenderer: EglRenderer: local_video_view: Dropping frame - Not initialized or already released.

E/Legacy-CameraDevice-JNI: LegacyCameraDevice_nativeGetSurfaceId: Could not retrieve native Surface from surface.
E/CameraDeviceGLThread-1: Received exception on GL render thread:
java.lang.IllegalArgumentException: Surface had no valid native Surface.
at android.hardware.camera2.legacy.LegacyCameraDevice.nativeGetSurfaceId(Native Method)
at android.hardware.camera2.legacy.LegacyCameraDevice.getSurfaceId(LegacyCameraDevice.java:538)
at android.hardware.camera2.legacy.LegacyCameraDevice.getSurfaceIds(LegacyCameraDevice.java:547)
at android.hardware.camera2.legacy.SurfaceTextureRenderer.drawIntoSurfaces(SurfaceTextureRenderer.java:672)
at android.hardware.camera2.legacy.GLThreadManager$1.handleMessage(GLThreadManager.java:103)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:145)
at android.os.HandlerThread.run(HandlerThread.java:61)
I/CameraDeviceState: Legacy camera service transitioning to state ERROR

E/BufferQueueProducer: [unnamed-18880-1] dequeueBuffer: BufferQueue has been abandoned
E/BufferQueueProducer: [unnamed-18880-1] queueBuffer: BufferQueue has been abandoned
E/BufferQueueProducer: [unnamed-18880-1] dequeueBuffer: BufferQueue has been abandoned
E/BufferQueueProducer: [unnamed-18880-1] queueBuffer: BufferQueue has been abandoned
E/BufferQueueProducer: [unnamed-18880-1] dequeueBuffer: BufferQueue has been abandoned
E/BufferQueueProducer: [unnamed-18880-1] queueBuffer: BufferQueue has been abandoned
E/BufferQueueProducer: [unnamed-18880-1] cancelBuffer: BufferQueue has been abandoned
E/BufferQueueProducer: [unnamed-18880-1] cancelBuffer: BufferQueue has been abandoned
E/BufferQueueProducer: [unnamed-18880-1] cancelBuffer: BufferQueue has been abandoned
E/BufferQueueProducer: [unnamed-18880-1] cancelBuffer: BufferQueue has been abandoned
E/BufferQueueProducer: [unnamed-18880-1] cancelBuffer: BufferQueue has been abandoned
I/Camera2Session: Camera2Session: Stop done

D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN
I/MIN: finish
E/ViewRootImpl: sendUserActionEvent() mView == null
I/MIN: onPause
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@19030645 time:218657346
I/MIN: onStop
I/MIN: onDestroy
E/ActivityThread: Activity kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall has leaked ServiceConnection android.bluetooth.BluetoothHeadset$2@6ccfffd that was originally bound here
android.app.ServiceConnectionLeaked: Activity kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall has leaked ServiceConnection android.bluetooth.BluetoothHeadset$2@6ccfffd that was originally bound here
at android.app.LoadedApk$ServiceDispatcher.(LoadedApk.java:1134)
at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:1028)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:2155)
at android.app.ContextImpl.bindServiceAsUser(ContextImpl.java:2145)
at android.content.ContextWrapper.bindServiceAsUser(ContextWrapper.java:566)
at android.bluetooth.BluetoothHeadset.doBind(BluetoothHeadset.java:304)
at android.bluetooth.BluetoothHeadset.(BluetoothHeadset.java:297)
at android.bluetooth.BluetoothAdapter.getProfileProxy(BluetoothAdapter.java:1808)
at com.remon.remondroid.core.BluetoothHeadsetManager.start(BluetoothHeadsetManager.java:85)
at com.remon.remondroid.core.AppRTCAudioManager.init(AppRTCAudioManager.java:254)
at com.remon.remondroid.core.MediaManager.createAudioManager(MediaManager.java:78)
at com.remon.remondroid.Remon.(Remon.java:67)
at kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall.createPlayRTCInstance(ActVideoCall.java:1142)
at kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall.onCreate(ActVideoCall.java:259)
at android.app.Activity.performCreate(Activity.java:6288)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
I/System.out: KnoxVpnUidStorageknoxVpnSupported API value returned is false
D/ConnectivityManager.CallbackHandler: CM callback handler got msg 524295
D/ConnectivityManager.CallbackHandler: CM callback handler got msg 524295

이상태에서 다시 연결을 했을때 연결이 되지 않아 finish를 했을때, 아래와 같은 로그가 남습니다.

I/MIN: finish
I/MIN: onPause
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@19030645 time:219069669
I/MIN: onStop
I/MIN: onDestroy
E/ActivityThread: Activity kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall has leaked IntentReceiver com.remon.remondroid.core.AppRTCAudioManager$3@26523b9 that was originally registered here. Are you missing a call to unregisterReceiver()?
android.app.IntentReceiverLeaked: Activity kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall has leaked IntentReceiver com.remon.remondroid.core.AppRTCAudioManager$3@26523b9 that was originally registered here. Are you missing a call to unregisterReceiver()?
at android.app.LoadedApk$ReceiverDispatcher.(LoadedApk.java:960)
at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:761)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:2015)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1995)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1989)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:503)
at com.remon.remondroid.core.AppRTCAudioManager.registerForWiredHeadsetIntentBroadcast(AppRTCAudioManager.java:375)
at com.remon.remondroid.core.AppRTCAudioManager.init(AppRTCAudioManager.java:249)
at com.remon.remondroid.core.MediaManager.createAudioManager(MediaManager.java:78)
at com.remon.remondroid.Remon.(Remon.java:67)
at kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall.createPlayRTCInstance(ActVideoCall.java:1142)
at kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall.onCreate(ActVideoCall.java:259)
at android.app.Activity.performCreate(Activity.java:6288)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
E/ActivityThread: Activity kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall has leaked ServiceConnection android.bluetooth.BluetoothHeadset$2@3008c3fe that was originally bound here
android.app.ServiceConnectionLeaked: Activity kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall has leaked ServiceConnection android.bluetooth.BluetoothHeadset$2@3008c3fe that was originally bound here
at android.app.LoadedApk$ServiceDispatcher.(LoadedApk.java:1134)
at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:1028)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:2155)
at android.app.ContextImpl.bindServiceAsUser(ContextImpl.java:2145)
at android.content.ContextWrapper.bindServiceAsUser(ContextWrapper.java:566)
at android.bluetooth.BluetoothHeadset.doBind(BluetoothHeadset.java:304)
at android.bluetooth.BluetoothHeadset.(BluetoothHeadset.java:297)
at android.bluetooth.BluetoothAdapter.getProfileProxy(BluetoothAdapter.java:1808)
at com.remon.remondroid.core.BluetoothHeadsetManager.start(BluetoothHeadsetManager.java:85)
at com.remon.remondroid.core.AppRTCAudioManager.init(AppRTCAudioManager.java:254)
at com.remon.remondroid.core.MediaManager.createAudioManager(MediaManager.java:78)
at com.remon.remondroid.Remon.(Remon.java:67)
at kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall.createPlayRTCInstance(ActVideoCall.java:1142)
at kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall.onCreate(ActVideoCall.java:259)
at android.app.Activity.performCreate(Activity.java:6288)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
I/EglRenderer: EglRenderer: remote_video_view: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: 0.0. Average render time: NA. Average swapBuffer time: NA.
I/WebRtcAudioManager: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/EglRenderer: EglRenderer: remote_video_view: Duration: 4007 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: 0.0. Average render time: NA. Average swapBuffer time: NA.
I/EglRenderer: EglRenderer: remote_video_view: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: 0.0. Average render time: NA. Average swapBuffer time: NA.
I/WebRtcAudioManager: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/EglRenderer: EglRenderer: remote_video_view: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: 0.0. Average render time: NA. Average swapBuffer time: NA.
I/EglRenderer: EglRenderer: remote_video_view: Duration: 4007 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: 0.0. Average render time: NA. Average swapBuffer time: NA.
I/EglRenderer: EglRenderer: remote_video_view: Duration: 4008 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: 0.0. Average render time: NA. Average swapBuffer time: NA.
I/WebRtcAudioManager: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/EglRenderer: EglRenderer: remote_video_view: Duration: 4016 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: 0.0. Average render time: NA. Average swapBuffer time: NA.
I/EglRenderer: EglRenderer: remote_video_view: Duration: 4001 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: 0.0. Average render time: NA. Average swapBuffer time: NA.

아직 저번 현상과 비슷한것 같습니다.

그럼 수고하세요.

혹시 재 연결이 안되고 있나요?
아니면 단지 state가 fail인 것인지요?

처음 연결시에
init -> wait -> connect 에서 complete이 이된후 , finish로 통화액티비티를 종료하며 remon.close를 하면
close 상태가 됩니다.
그상태에서

W/System.err: java.lang.IllegalStateException: Wrong thread
W/System.err: at org.webrtc.ThreadUtils$ThreadChecker.checkIsOnValidThread(ThreadUtils.java:33)
W/System.err: at com.remon.remondroid.core.AppRTCProximitySensor.stop(AppRTCProximitySensor.java:78)
W/System.err: at com.remon.remondroid.core.AppRTCAudioManager.close(AppRTCAudioManager.java:274)

가 뜨며 fail이 됩니다.

D/ActVideoCall: onStateChange FAIL,mLocalChannelID:video_unse_-95483680
I/System.out: WebSocket Client disconnected!

재접속시엔 init->wait->connect 상태에서 complete까지 도달하지 않습니다.
그래서 finish와 remon.close로 액티비티를 종료하면

E/ActivityThread: Activity kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall has leaked IntentReceiver com.remon.remondroid.core.AppRTCAudioManager$3@26523b9 that was originally registered here. Are you missing a call to unregisterReceiver()?
android.app.IntentReceiverLeaked: Activity kr.co.xitech.androidcounselor.ActVideoCall.ActVideoCall has leaked IntentReceiver com.remon.remondroid.core.AppRTCAudioManager$3@26523b9 that was originally registered here. Are you missing a call to unregisterReceiver()?
at android.app.LoadedApk$ReceiverDispatcher.(LoadedApk.java:960)
at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:761)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:2015)

에러가 나옵니다.

그후 재접속도 하지 않앗으나

I/WebRtcAudioManager: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/EglRenderer: EglRenderer: remote_video_view: Duration: 4007 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: 0.0. Average render time: NA. Average swapBuffer time: NA.
I/EglRenderer: EglRenderer: remote_video_view: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: 0.0. Average render time: NA. Average swapBuffer time: NA.
I/WebRtcAudioManager: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/EglRenderer: EglRenderer: remote_video_view: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: 0.0. Average render time: NA. Average swapBuffer time: NA.
I/EglRenderer: EglRenderer: remote_video_view: Duration: 4007 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: 0.0. Average render time: NA. Average swapBuffer time: NA.
I/EglRenderer: EglRenderer: remote_video_view: Duration: 4008 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: 0.0. Average render time: NA. Average swapBuffer time: NA.
I/WebRtcAudioManager: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)

로그가 계속 나옵니다.

혹시 상대편에서 연결을 끊었을 경우에 대한 remon 객체 close처리가 되고 있는지 확인해보실 수 있으신지요?
onStateChange이벤트에서 CLOSE이벤트 발생시 혹은 onError이벤트 발생시 remon.close가 호출되는지 여부등을 확인부탁드려요.

특정 상황에서는 스레드 문제로 close가 제대로 되지 않는 버그를 발견하여 수정하였습니다.
0.2.6버전을 다운로드받으셔서 실행하세요.

예 일단은 업데이트 하니까 끊기거나 꺼지지 않고 재 연결이 됩니다.

지금 상황에서 조금씩 테스트를 더 해보고 나중에 안풀리는 점이 있으면 또 연락드리겠습니다. ^^
감사합니다.