Reputation: 1470
I am using Companion device pairing and followed this guide.
when I try to associate to a device like that deviceManager.associate(pairingRequest,callbacks)
it will start scanning for BLE devices.
1.how long will it be scanning for?
2.is there a way for me to stop scanning?
Upvotes: 2
Views: 539
Reputation: 18452
The companion device api hasn't received much love from Google unfortunately. The fact that it has a timeout is undocumented and it's not even possible to stop the scan for example when the Activity is destroyed or the user leaves.
Anyway, the timeout is 20 seconds (as the time of writing this post) as can be found here: https://android.googlesource.com/platform/frameworks/base/+/158d5e7f788d9b4d6d8876d38118250979c35e37%5E%21/.
Upvotes: 3