Reputation: 261
I can discover devices and createbond. It's working fine. But when the user close the app and open again I'm already in bonded state and I only need open serial socket but I can't find the device!
GetBondedDevice gives all the device connected before and also the active one. Because of that I can't understand is it realy connected and ready to open serialsocket! Serial socket is not always active. I'm closing onDestroy or onPause to stop communicate.
To simplfy the question: I want to check if given mac address is paired and ready to open serial socket.
Upvotes: 2
Views: 506
Reputation: 13375
As you mentioned, paired devices and connected devices are two different things as follows:-
In your case, to get devices that have an active connection to your device, you can use the getConnectedDevices or getConnectionState.
You can find more references here:-
Upvotes: 2