Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register


AsyncScanController - connect after first connection?


Total Posts: 1

Joined 2020-05-21


I'm developing an app that shows a scan UX side-by-side with a connected device UX. I'm seeing behaviour where, when I connect to a device via the AsyncScanController API: https://www.thisisant.com/APIassets/Android_ANT_plus_plugins_API/com/dsi/ant/plugins/antplus/pccbase/AsyncScanController.html
I can no longer connect to any devices found by that scan via the scan controller. Based on the documentation, this makes sense as the docs suggest the scan controller is in fact closed when we connect to a device.

My problem is that I'd like to offer the users the ability to connect to a *different* device, hopefully without starting a new scan. Is that possible?      

Total Posts: 731

Joined 2012-09-14



I would encourage you to take a look at the MultiDeviceSearch API instead, which uses a single, separate ANT channel rather than the active channel to scan for multiple devices.

There is an example activity included with the Plugin Sampler source code.