Open farmazon3000 opened 8 years ago
I'm wary of adding code to support one specific vendor. The Android documentation explicitly states that isMultipleAdvertisementSupported() should be used to check for advertising support.
The Android documentation explicitly states that isMultipleAdvertisementSupported() should be used to check for advertising support
Does it? No it does not.
What it does says is https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#isMultipleAdvertisementSupported()
Return true if the multi advertisement is supported by the chipset
Should have included a citation in my original response. It is under getBluetoothLeAdvertiser:
Use isMultipleAdvertisementSupported() to check whether LE Advertising is supported on this device before calling this method.
@g-ortuno I think @farmazon3000 is right.
Just checking the response of getBluetoothLeAdvertiser()
is null or not, it can determine whether
the device supports LE advertising. The comment of getBluetoothLeAdvertiser()
is not accurate, you can check the source code of the method. I think the correct comment should be Use isMultipleAdvertisementSupported() to check whether LE *multiple* Advertising is supported on this device before calling this method.
Ok. For BLE Test Peripheral, is this check causing you to not be able to use the tool?
@scheib Yes. If I can not pass the checking, BLE Test Peripheral will show LE Advertising is not available. Please pair with a device to be discoverable.
.
Hi, any conclusion on this subject?
Actually, it's not required to support multiple advertisement for Android device to act as peripheral role. Check the official example.
I have a device which returns false with isMultipleAdvertisementSupported()
, it works just with the official example.
I'm convinced. Feel free to send a CL to change this.
Actually, it's not required to support multiple advertisement for Android device to act as peripheral role. Check the official example.
I have a device which returns false with
isMultipleAdvertisementSupported()
, it works just with the official example.
THANKS A LOT, you made my day
In https://github.com/WebBluetoothCG/ble-test-peripheral-android/blob/master/app/src/main/java/io/github/webbluetoothcg/bletestperipheral/Peripheral.java there is:
And this is misuse of
isMultipleAdvertisementSupported
, check this https://github.com/AltBeacon/android-beacon-library/issues/266: