BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();

if (mBluetoothAdapter.getScanMode() != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
	Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
	discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 120);

	startActivityForResult(discoverableIntent, REQUEST_DISCOVERABLE_BT);

} 




 

내 장치를 찾게 하는 블루투스 채팅 샘플에 잇는 코드 입니다.

문제는 내 장치를 찾게 하는 것을 중단 시키는 방법을 알고 싶습니당.


내 장치를 이미 찾게 하고 있는 중일때, 그것을 중단 시키고, 다시 호출해야 하거든요.



검색을 해봤더니, 저걸 두번 호출하게 하면 된다 라고 나오는대, -,-; 그럼 팝업창이 두번뜨게 되서 영 아닌거 같고요.