I am working on a project related to Bluetooth. I wrote this sample code to detect Bluetooth in a device.
BluetoothAdapter bluetooth = BluetoothAdapter.getDefaultAdapter();
if(bluetooth!=null)
{
Toast.makeText(getApplicationContext(), "gfvhfh", Toast.LENGTH_LONG).show();
}
This code is working perfectly in my phone and displaying the text in toast, but in my system it's not showing anything. I am using a external Bluetooth adapter for my system.