Hello,
I just followed the instruction on Scanning for Estimote Telemetry , it works. But there is no stop() method when I try to stop the scanner. After taking a look at the api, the start() method returns a ScanHandler and this class has a stop() method. So the code to stop scanning is like this: telemetryFullScanHandler.start().stop(), which looks quite weird to me. Did I use the wrong method? Code snippet here:
I don’t see ScanHandler on your import list. You should import a class before you use it, even in Kotlin.
Android Studio should mark missing class name red and show a hint that import is missing. You just press Alt+Enter (platform dependent) and it will show you a list of actions to do. You just select Import and it should add: import com.estimote.internal_plugins_api.scanning.ScanHandler
Android Studio tells me
import com.estimote.internal_plugins_api.scanning.BluetoothScanner
import com.estimote.internal_plugins_api.scanning.ScanLauncher
import com.estimote.internal_plugins_api.scanning.ScanHandler
You didn’t properly change the code. You just removed call to start() method.
Please look at the code snippet I sent you before and modify your code accordingly.
Thank you pober. I didn’t look at your code carefully.
changed val scanHandler : ScanHandler? = null to var scanHandler : ScanHandler? = null and it works.