I have the need to detect if a certain mac address is connected or in range, if it is then my app assumes that you are for example at home or in your car.
From my reading on the Bluetooth docs, it all seems more to scan and try pair / connect with new devices. I don't want to do this, Just detect if a device is in range or connected. I will know the mac address up front.
for example:
if(BluetoothAdapter.IsConnectedTo("MAC ADDRESS"))
{
Toast.makeText(this,"You are in your car",Toast.Short).show();
}
In other questions they say I should set a broadcast intent for onConnected and on disconnect. However this will only trigger when connecting, This wont help me if the device is already connected.
The other option they scan for discover-able devices, But this does not show me if the phone is currently connected to that specific device?