Skip to content

Commit 3a208f4

Browse files
Merge pull request #15 from microbit-foundation/target-android14
* targetSdk 34 * Fix call to createBond()
2 parents adfc960 + f41d424 commit 3a208f4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ android {
55

66
defaultConfig {
77
minSdkVersion 19
8-
targetSdk 33
8+
targetSdk 34
99
}
1010

1111
buildTypes {

src/main/java/org/microbit/android/partialflashing/PartialFlashingBaseService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,8 +651,10 @@ public void onServicesDiscovered(BluetoothGatt gatt, int status) {
651651
logi( "BOND_NONE");
652652
//TODO: access characteristic to initiate bonding
653653
logi("Call createBond()");
654-
boolean started = mBluetoothGatt.getDevice().createBond();
654+
mWaitingForBonding = true;
655+
boolean started = gatt.getDevice().createBond();
655656
if (!started) {
657+
mWaitingForBonding = false;
656658
logi("createBond() failed");
657659
mConnectionState = STATE_ERROR;
658660
}

0 commit comments

Comments
 (0)