마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

블루투스 챗 중지 발생현상에 대해 질문드립니다.

0 추천

 

 기존의 제공하는 샘플 프로젝트중에 bluetooth chat 코드를

 

 그대로 사용하여(전혀 수정하지않고) 컴파일하면

 

 처음에 블루투스를 켜시겠습니까 까지는 정상적으로 동작하나, 블루투스가 켜지면

 

 사용이 중지되었습니다 라는 오류와 함께 꺼져버리더군요 ㅠㅠ 

 

 예제샘플을 그대로 썼는데도 왜이런지 모르겠습니다 ㅠㅠㅠㅠ

 

 아래는  로그캣정보구요 도와주세요 ㅠ

 

07-30 16:02:01.413: E   /BluetoothChat(12219): +++ ON CREATE +++
07-30 16:02:01.438: E   /BluetoothChat(12219): ++ ON START ++
07-30 16:02:01.443: D   /BluetoothChat(12219): setupChat()
07-30 16:02:01.443: E   /BluetoothChat(12219): + ON RESUME +
07-30 16:02:01.443: D   /BluetoothChatService(12219): start
07-30 16:02:01.443: D   /BluetoothChatService(12219): setState() 0 -> 1
07-30 16:02:01.443: V   /BluetoothSocket.cpp(12219): initSocketNative
07-30 16:02:01.443: V   /BluetoothSocket.cpp(12219): ...fd 46 created (RFCOMM, lm = 26)
07-30 16:02:01.443: V   /BluetoothSocket.cpp(12219): initSocketFromFdNative
07-30 16:02:01.448: D   /BluetoothUtils(12219): isSocketAllowedBySecurityPolicy start : device null
07-30 16:02:01.448: V   /BluetoothSocket.cpp(12219): bindListenNative
07-30 16:02:01.448: V   /BluetoothSocket.cpp(12219): ...bindListenNative(46) success
07-30 16:02:01.458: D   /BluetoothChatService(12219): Socket Type: SecureBEGIN mAcceptThreadThread[Thread-1323,5,main]
07-30 16:02:01.458: V   /BluetoothSocket.cpp(12219): initSocketNative
07-30 16:02:01.458: V   /BluetoothSocket.cpp(12219): ...fd 49 created (RFCOMM, lm = 0)
07-30 16:02:01.458: V   /BluetoothSocket.cpp(12219): acceptNative
07-30 16:02:01.458: V   /BluetoothSocket.cpp(12219): initSocketFromFdNative
07-30 16:02:01.458: D   /BluetoothUtils(12219): isSocketAllowedBySecurityPolicy start : device null
07-30 16:02:01.458: V   /BluetoothSocket.cpp(12219): bindListenNative
07-30 16:02:01.458: V   /BluetoothSocket.cpp(12219): ...bindListenNative(49) success
07-30 16:02:01.468: D   /BluetoothChatService(12219): Socket Type: InsecureBEGIN mAcceptThreadThread[Thread-1324,5,main]
07-30 16:02:01.468: V   /BluetoothSocket.cpp(12219): acceptNative
07-30 16:02:01.473: I   /BluetoothChat(12219): MESSAGE_STATE_CHANGE: 1
07-30 16:02:01.473: D   /AndroidRuntime(12219): Shutting down VM
07-30 16:02:01.473: W   /dalvikvm(12219): threadid=1: thread exiting with uncaught exception (group=0x40c1c1f8)
07-30 16:02:01.473: E   /AndroidRuntime(12219): FATAL EXCEPTION: main
07-30 16:02:01.473: E   /AndroidRuntime(12219): java.lang.NullPointerException
07-30 16:02:01.473: E   /AndroidRuntime(12219): at com.example.android.BluetoothChat.BluetoothChat.setStatus(BluetoothChat.java:235)
07-30 16:02:01.473: E   /AndroidRuntime(12219): at com.example.android.BluetoothChat.BluetoothChat.access$4(BluetoothChat.java:233)
07-30 16:02:01.473: E   /AndroidRuntime(12219): at com.example.android.BluetoothChat.BluetoothChat$2.handleMessage(BluetoothChat.java:260)
07-30 16:02:01.473: E   /AndroidRuntime(12219): at android.os.Handler.dispatchMessage(Handler.java:99)
07-30 16:02:01.473: E   /AndroidRuntime(12219): at android.os.Looper.loop(Looper.java:137)
07-30 16:02:01.473: E   /AndroidRuntime(12219): at android.app.ActivityThread.main(ActivityThread.java:4507)
07-30 16:02:01.473: E   /AndroidRuntime(12219): at java.lang.reflect.Method.invokeNative(Native Method)
07-30 16:02:01.473: E   /AndroidRuntime(12219): at java.lang.reflect.Method.invoke(Method.java:511)
07-30 16:02:01.473: E   /AndroidRuntime(12219): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
07-30 16:02:01.473: E   /AndroidRuntime(12219): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
07-30 16:02:01.473: E   /AndroidRuntime(12219): at dalvik.system.NativeStart.main(Native Method)
 

 

 

nuessy (120 포인트) 님이 2013년 11월 23일 질문

1개의 답변

+1 추천
타이틀 변경하는 곳을 모두 주석처리 하시고 다시 시도해보세요.
인연 (31,880 포인트) 님이 2014년 3월 6일 답변
...