Adds support for Android companion pairing, device bonding, iOS device name (via GAP)#760
Adds support for Android companion pairing, device bonding, iOS device name (via GAP)#760ened wants to merge 21 commits into
Conversation
edc4b1b to
d292562
Compare
remonh87
left a comment
There was a problem hiding this comment.
Thanks for the PR I think it will be a great addition to the library. I will look into the implementation further this weekend but had now half hour time to overlook the structure. I am a bit concerned about adding the bond mode to connect method. Maybe it is better we add a specific method for companion pairing.
There was a problem hiding this comment.
Now the full review: again thank you very much for implementing this I think it is close to be integrated. Please check out my remarks. Also some generic things:
- Add unit tests for the compianonflow on dart
- Add unit tests for the protobuf conversion methods related to device name and companion flow
- Document the public methods Especially with
createBondit is important that we emphasise that this will only work on android.
Reach out if you need help
|
|
||
| override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?): Boolean { | ||
| if (requestCode == CompanionHandler.SELECT_DEVICE_REQUEST_CODE && resultCode == Activity.RESULT_OK) { | ||
| Log.d(TAG, "received result from device selection activity, parsing via companion handler") |
There was a problem hiding this comment.
let's remove the debug logs
- remove debug logs
|
|
||
| @RequiresApi(Build.VERSION_CODES.O) | ||
| fun onActivityResult(data: Intent?): ScanResult? { | ||
| Log.d(TAG, "onActivityResult: $data") |
There was a problem hiding this comment.
let's also remove here the debug logging
| } | ||
| completion(.success(message)) | ||
| } catch { | ||
| completion(.success(nil)) |
There was a problem hiding this comment.
This branch doesn't look like success to me.
This addresses #272, #628, #641 in the same PR.
For a project, I needed multiple additions, so the code is quite mixed.
Let's look at this PR holistically first. (I needed both sets of functionality for a project).
Whole set of changes:
CBPeripheral.namemethod, partially addresses Provide separate access to device name in Generic Access Profile and Advertisement Data. #641scan- from my App, which is great)