Hi! I am fighting with the new Proximity SDK telemetry features (moved from Estimote SDK). However the documents are Kotlin only, which is kind of a new experience for me I have tried to hook up different gists and created a simple app to log telemetry data. However after compiling I get an error Bluetooth Low Energy scan failed with error code
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val scanner = EstimoteBluetoothScannerFactory(applicationContext).getSimpleScanner()
val scanHandler = scanner.estimoteTelemetryFullScan()
.withBalancedPowerMode()
.withOnPacketFoundAction {
Log.d("Full Telemetry", "Got Full Telemetry packet: $it")
}
.start()
}
You can use this code inside your Java app just as any other Java library. Although I really encourage you to move to Kotlin - it’s far better than Java in my personal opinion
As for you problem - it seems that there is something wrong with your phone’s bluetooth. The data I need to know:
Scan error code 2 is, according to Google’s docs, SCAN_FAILED_APPLICATION_REGISTRATION_FAILED -> This is commonly returned when something happened in bluetooth service that runs within your OS. The common solution for that is to restart bluetooth on your phone. You might either disable/enable it, or if that doesn’t help, you can reset wireless data settings:
Find and tap Settings > Network & Internet. Tap the menu button (three vertical dots) > Network settings reset > RESET SETTINGS.
If your app is crashing due to an UndeliverableException you might want to update our SDK to version 0.3.1, where this should be fixed.