Skip to content

Commit

Permalink
Increased advertising power to maximum setting for faster connection
Browse files Browse the repository at this point in the history
We'll see how this one plays out in terms of power use on the phone side
  • Loading branch information
Bellafaire committed Oct 4, 2020
1 parent 0083596 commit d76b003
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ of this software and associated documentation files (the "Software"), to deal


import static android.bluetooth.le.AdvertiseSettings.ADVERTISE_MODE_BALANCED;
import static android.bluetooth.le.AdvertiseSettings.ADVERTISE_MODE_LOW_LATENCY;
import static android.bluetooth.le.AdvertiseSettings.ADVERTISE_TX_POWER_HIGH;


Expand Down Expand Up @@ -111,9 +112,10 @@ public void createBLEServer() {
AdvertiseSettings settings = new AdvertiseSettings.Builder()
.setConnectable(true)
.setTxPowerLevel(ADVERTISE_TX_POWER_HIGH)
.setAdvertiseMode(ADVERTISE_MODE_BALANCED)
.setAdvertiseMode(ADVERTISE_MODE_LOW_LATENCY)
.build();


AdvertiseData advertiseData = new AdvertiseData.Builder()
.setIncludeDeviceName(true)
.setIncludeTxPowerLevel(true)
Expand Down

0 comments on commit d76b003

Please sign in to comment.