mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
#14: not ready - but I need to do other stuff - so disabling for now
This commit is contained in:
parent
b4bf682df0
commit
5036cb906b
3 changed files with 62 additions and 26 deletions
|
|
@ -108,7 +108,8 @@ class MainActivity : AppCompatActivity(), Logging,
|
|||
const val REQUEST_ENABLE_BT = 10
|
||||
const val DID_REQUEST_PERM = 11
|
||||
const val RC_SIGN_IN = 12 // google signin completed
|
||||
const val RC_SELECT_DEVICE = 65549 // seems to be hardwired in CompanionDeviceManager
|
||||
const val RC_SELECT_DEVICE =
|
||||
13 // seems to be hardwired in CompanionDeviceManager to add 65536
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -405,14 +406,19 @@ class MainActivity : AppCompatActivity(), Logging,
|
|||
GoogleSignIn.getSignedInAccountFromIntent(data)
|
||||
handleSignInResult(task)
|
||||
}
|
||||
RC_SELECT_DEVICE -> when (resultCode) {
|
||||
(65536 + RC_SELECT_DEVICE) -> when (resultCode) {
|
||||
Activity.RESULT_OK -> {
|
||||
// User has chosen to pair with the Bluetooth device.
|
||||
val device: BluetoothDevice =
|
||||
data!!.getParcelableExtra(CompanionDeviceManager.EXTRA_DEVICE)
|
||||
debug("Received BLE pairing ${device.address}")
|
||||
device.createBond()
|
||||
if (device.bondState != BluetoothDevice.BOND_BONDED) {
|
||||
device.createBond()
|
||||
// FIXME - wait for bond to complete
|
||||
}
|
||||
|
||||
// ... Continue interacting with the paired device.
|
||||
RadioInterfaceService.setBondedDeviceAddress(this, device.address)
|
||||
}
|
||||
|
||||
else ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue