Detecting if a Paired Blue Tooth Device is available

Hi,

I had what I thought would be a relatively simple requirement to start a service if a previously paired Blue Tooth Address the details of which I had stored in preferences was connected to the device. I have tried using a Broadcast Receiver to check when a device connects but that only works on some phones, others don't return any information about the device or the receiver is never called. So I have an Alarm that goes off and checks to see if the device is connected at regular points. I don't need anything from the device or its services but to know that it is connected.

I can get the device from the paired devices easily enough but I just need to know one thing. Is it connected at that moment in time? When I check the connection state with the device manager it always says disconnected despite the device being connected.

I admit to being fairly ignorant of the ins and outs of Bluetooth Devices and connecting to them but I didn't really think I would have to become an expert to fulfill what seemed like a simple requirement on the surface.

Is there a relatively simple, efficient solution to this that I am missing?

Thanks

Answers

  • izhangizhang USMember, Xamarin Team Xamurai

    So my understanding is that you need connect to a device after pairing it. Where are you seeing the mismatch between the connected states? It seems that you see the device being disconnected in the device manager but within the code you are seeing a "connected" state, is this correct?

Sign In or Register to comment.