Skip to content

Commit 2ffef2c

Browse files
Fixes #327
Finally, as the author suggest, by removing the condition "|| !bluetoothAdapter.isMultipleAdvertisementSupported()" 2 of my old android cellphones start working, because they support advertising but the condition isMultipleAdvertisementSupported returned false for both of them.
1 parent c262f49 commit 2ffef2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/android/BluetoothLePlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ private void startAdvertisingAction(JSONArray args, CallbackContext callbackCont
684684
}
685685

686686
BluetoothLeAdvertiser advertiser = bluetoothAdapter.getBluetoothLeAdvertiser();
687-
if (advertiser == null || !bluetoothAdapter.isMultipleAdvertisementSupported()) {
687+
if (advertiser == null) {
688688
JSONObject returnObj = new JSONObject();
689689

690690
addProperty(returnObj, "error", "startAdvertising");
@@ -759,7 +759,7 @@ private void startAdvertisingAction(JSONArray args, CallbackContext callbackCont
759759

760760
private void stopAdvertisingAction(JSONArray args, CallbackContext callbackContext) {
761761
BluetoothLeAdvertiser advertiser = bluetoothAdapter.getBluetoothLeAdvertiser();
762-
if (advertiser == null || !bluetoothAdapter.isMultipleAdvertisementSupported()) {
762+
if (advertiser == null) {
763763
JSONObject returnObj = new JSONObject();
764764

765765
addProperty(returnObj, "error", "startAdvertising");

0 commit comments

Comments
 (0)