Misuse of mBluetoothAdapter.isMultipleAdvertisementSupported()
See original GitHub issueif (!mBluetoothAdapter.isMultipleAdvertisementSupported()) {
Toast.makeText(this, R.string.bluetoothAdvertisingNotSupported, Toast.LENGTH_LONG).show();
Log.e(TAG, "Advertising not supported");
}
And this is misuse of isMultipleAdvertisementSupported
, check this https://github.com/AltBeacon/android-beacon-library/issues/266:
It is important to understand that just because isMultipleAdvertisementSupported() returns false does not mean that the device cannot advertise at all – it means either that it cannot advertise at all OR that it can only transmit one advertisement at a time. Many Motorola devices (Moto X, Moto G) behave this way. The way you are supposed to check if advertising is supported at all is to get an instance of BluetoothLEAdvertiser. If the call to get an instance fails, then it is not supported.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Locate Beacon app returns different from ... - GitHub
It is important to understand that just because isMultipleAdvertisementSupported() returns false does not mean that the device cannot advertise ...
Read more >Why isMultipleAdvertisementSupported() returns false, when ...
These devices return a BluetoothLeAdvertiser despite the fact that isMultipleAdvertisementSupported() returns false. A Motorola engineer explained to me ...
Read more >BluetoothAdapter - Android Developers
To get a BluetoothAdapter representing the local Bluetooth adapter, ... Use isMultipleAdvertisementSupported() to check whether LE Advertising is supported ...
Read more >Diff - 56d16568c0233dacec8f3c20cc987b2b68298e7a^2 ...
Closeable { method public void close() throws java.io.IOException; method public void ... diff --git a/core/java/android/bluetooth/BluetoothAdapter.java ...
Read more >Working Smarter - Advertising - Google Sites
private BluetoothAdapter mBluetoothAdapter = ((BluetoothManager) ... onStartFailure() method of an AdvertiseCallback implementation.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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