-
Notifications
You must be signed in to change notification settings - Fork 8
Description
I've implemented the Flic 2 library as shown in the tutorial. After scanning for buttons, Flic2ScanCallback.onComplete() always returns result 4, or RESULT_FAILED_NO_NEW_BUTTONS_FOUND.
I started with the button new out of the box and this happened, then I installed the latest Flic app and paired the button with that and it still happened. I can see the button light turn green and hear the Flic app beep when I press the button, so it is successfully connected to the Flic app, but my app doesn't connect to it.
I do have the FINE_LOCATION permission, and I don't see anything interesting in the console. Here's the console output from the moment I run Flic2Manager.startScan():
D/onItemClick: do action connectFlic2Button
D/BluetoothAdapter: isLeEnabled(): ON
D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=8 mScannerId=0
D/BluetoothAdapter: isLeEnabled(): ON
D/BluetoothAdapter: isLeEnabled(): ON
D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=8 mScannerId=0
D/BluetoothAdapter: isLeEnabled(): ON
D/BluetoothAdapter: isLeEnabled(): ON
D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=8 mScannerId=0
D/BluetoothAdapter: isLeEnabled(): ON
D/connectFlic2Button: error 4
My app has over 100 remote controllable functions, so I want to use my existing app interface to assign Flic actions, rather than set up my actions in the Flic app. This is the approach I took with the first-generation Flic buttons and it worked well for my users. I assume I can follow the same approach with Flic 2.
Am I misunderstanding how this is supposed to work? What else could cause the constant NO_NEW_BUTTONS_FOUND error?