Hi i have one problem. When i am using this code in code in main window everything work fine, but when i move that code to my class and put it into the function the code stop application.
if (mBluetoothAdapter.getScanMode() != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE)
Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
Log.i("Bluetooth", "Device is discoverable");
The error is in function startActivity(). Someone can tell me how to make it working well.