Package org.robolectric.shadows
Class ShadowBluetoothLeAdvertiser
java.lang.Object
org.robolectric.shadows.ShadowBluetoothLeAdvertiser
@Implements(value=android.bluetooth.le.BluetoothLeAdvertiser.class, minSdk=26) public class ShadowBluetoothLeAdvertiser extends Object
Shadow implementation of 
BluetoothLeAdvertiser.- 
Field SummaryFields Modifier and Type Field Description protected org.robolectric.shadows.ShadowBluetoothLeAdvertiser.BluetoothLeAdvertiserReflectorbluetoothLeAdvertiserReflector
- 
Constructor SummaryConstructors Constructor Description ShadowBluetoothLeAdvertiser()
- 
Method SummaryModifier and Type Method Description protected void__constructor__(BluetoothAdapter bluetoothAdapter)protected void__constructor__(IBluetoothManager bluetoothManager)intgetAdvertisementRequestCount()Returns the count of current ongoing Bluetooth LE advertising requests.protected voidstartAdvertising(AdvertiseSettings settings, AdvertiseData advertiseData, AdvertiseCallback callback)Start Bluetooth LE Advertising.protected voidstartAdvertising(AdvertiseSettings settings, AdvertiseData advertiseData, AdvertiseData scanResponse, AdvertiseCallback callback)Start Bluetooth LE Advertising.protected voidstopAdvertising(AdvertiseCallback callback)Stop Bluetooth LE advertising.
- 
Field Details- 
bluetoothLeAdvertiserReflector@ReflectorObject protected org.robolectric.shadows.ShadowBluetoothLeAdvertiser.BluetoothLeAdvertiserReflector bluetoothLeAdvertiserReflector
 
- 
- 
Constructor Details- 
ShadowBluetoothLeAdvertiserpublic ShadowBluetoothLeAdvertiser()
 
- 
- 
Method Details- 
__constructor__
- 
__constructor__
- 
startAdvertising@Implementation protected void startAdvertising(AdvertiseSettings settings, AdvertiseData advertiseData, AdvertiseCallback callback)Start Bluetooth LE Advertising. This method returns immediately, the operation status is delivered throughcallback.- Parameters:
- settings- Settings for Bluetooth LE advertising.
- advertiseData- Advertisement data to be broadcasted.
- callback- Callback for advertising status.
 
- 
startAdvertising@Implementation protected void startAdvertising(AdvertiseSettings settings, AdvertiseData advertiseData, AdvertiseData scanResponse, AdvertiseCallback callback)Start Bluetooth LE Advertising. This method returns immediately, the operation status is delivered throughcallback.- Parameters:
- settings- Settings for Bluetooth LE advertising.
- advertiseData- Advertisement data to be broadcasted.
- scanResponse- Scan response associated with the advertisement data.
- callback- Callback for advertising status.
- Throws:
- IllegalArgumentException- When- callbackis not present.
 
- 
stopAdvertisingStop Bluetooth LE advertising. Thecallbackmust be the same one use instartAdvertising(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseCallback).- Parameters:
- callback-- AdvertiseCallbackidentifies the advertising instance to stop.
- Throws:
- IllegalArgumentException- When the- callbackis not a key present in- advertisements.
 
- 
getAdvertisementRequestCountpublic int getAdvertisementRequestCount()Returns the count of current ongoing Bluetooth LE advertising requests.
 
-