AdvertisingSetCallback
  public
  
  
  abstract
  class
  AdvertisingSetCallback
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.bluetooth.le.AdvertisingSetCallback | 
Bluetooth LE advertising set callbacks, used to deliver advertising operation status.
Summary
Constants | |
|---|---|
int | 
        
          ADVERTISE_FAILED_ALREADY_STARTED
          Failed to start advertising as the advertising is already started.  | 
    
int | 
        
          ADVERTISE_FAILED_DATA_TOO_LARGE
          Failed to start advertising as the advertise data to be broadcasted is too large.  | 
    
int | 
        
          ADVERTISE_FAILED_FEATURE_UNSUPPORTED
          This feature is not supported on this platform.  | 
    
int | 
        
          ADVERTISE_FAILED_INTERNAL_ERROR
          Operation failed due to an internal error.  | 
    
int | 
        
          ADVERTISE_FAILED_TOO_MANY_ADVERTISERS
          Failed to start advertising because no advertising instance is available.  | 
    
int | 
        
          ADVERTISE_SUCCESS
          The requested operation was successful.  | 
    
Public constructors | |
|---|---|
      
      AdvertisingSetCallback()
      
      
     | 
  |
Public methods | |
|---|---|
        
        
        
        
        
        void
     | 
  
    
      
      onAdvertisingDataSet(AdvertisingSet advertisingSet, int status)
      
      
        Callback triggered in response to   | 
  
        
        
        
        
        
        void
     | 
  
    
      
      onAdvertisingEnabled(AdvertisingSet advertisingSet, boolean enable, int status)
      
      
        Callback triggered in response to   | 
  
        
        
        
        
        
        void
     | 
  
    
      
      onAdvertisingParametersUpdated(AdvertisingSet advertisingSet, int txPower, int status)
      
      
        Callback triggered in response to   | 
  
        
        
        
        
        
        void
     | 
  
    
      
      onAdvertisingSetStarted(AdvertisingSet advertisingSet, int txPower, int status)
      
      
        Callback triggered in response to   | 
  
        
        
        
        
        
        void
     | 
  
    
      
      onAdvertisingSetStopped(AdvertisingSet advertisingSet)
      
      
        Callback triggered in response to   | 
  
        
        
        
        
        
        void
     | 
  
    
      
      onPeriodicAdvertisingDataSet(AdvertisingSet advertisingSet, int status)
      
      
        Callback triggered in response to   | 
  
        
        
        
        
        
        void
     | 
  
    
      
      onPeriodicAdvertisingEnabled(AdvertisingSet advertisingSet, boolean enable, int status)
      
      
        Callback triggered in response to   | 
  
        
        
        
        
        
        void
     | 
  
    
      
      onPeriodicAdvertisingParametersUpdated(AdvertisingSet advertisingSet, int status)
      
      
        Callback triggered in response to   | 
  
        
        
        
        
        
        void
     | 
  
    
      
      onScanResponseDataSet(AdvertisingSet advertisingSet, int status)
      
      
        Callback triggered in response to   | 
  
Inherited methods | |
|---|---|
Constants
ADVERTISE_FAILED_ALREADY_STARTED
public static final int ADVERTISE_FAILED_ALREADY_STARTED
Failed to start advertising as the advertising is already started.
Constant Value: 3 (0x00000003)
ADVERTISE_FAILED_DATA_TOO_LARGE
public static final int ADVERTISE_FAILED_DATA_TOO_LARGE
Failed to start advertising as the advertise data to be broadcasted is too large.
Constant Value: 1 (0x00000001)
ADVERTISE_FAILED_FEATURE_UNSUPPORTED
public static final int ADVERTISE_FAILED_FEATURE_UNSUPPORTED
This feature is not supported on this platform.
Constant Value: 5 (0x00000005)
ADVERTISE_FAILED_INTERNAL_ERROR
public static final int ADVERTISE_FAILED_INTERNAL_ERROR
Operation failed due to an internal error.
Constant Value: 4 (0x00000004)
ADVERTISE_FAILED_TOO_MANY_ADVERTISERS
public static final int ADVERTISE_FAILED_TOO_MANY_ADVERTISERS
Failed to start advertising because no advertising instance is available.
Constant Value: 2 (0x00000002)
ADVERTISE_SUCCESS
public static final int ADVERTISE_SUCCESS
The requested operation was successful.
Constant Value: 0 (0x00000000)
Public constructors
Public methods
onAdvertisingDataSet
public void onAdvertisingDataSet (AdvertisingSet advertisingSet, int status)
Callback triggered in response to AdvertisingSet.setAdvertisingData indicating result
 of the operation. If status is ADVERTISE_SUCCESS, then data was changed.
| Parameters | |
|---|---|
advertisingSet | 
        
          AdvertisingSet: The advertising set. | 
      
status | 
        
          int: Status of the operation. | 
      
onAdvertisingEnabled
public void onAdvertisingEnabled (AdvertisingSet advertisingSet, boolean enable, int status)
Callback triggered in response to BluetoothLeAdvertiser.startAdvertisingSet
 indicating result of the operation. If status is ADVERTISE_SUCCESS, then advertising set is
 advertising.
| Parameters | |
|---|---|
advertisingSet | 
        
          AdvertisingSet: The advertising set. | 
      
enable | 
        
          boolean  | 
      
status | 
        
          int: Status of the operation. | 
      
onAdvertisingParametersUpdated
public void onAdvertisingParametersUpdated (AdvertisingSet advertisingSet, int txPower, int status)
Callback triggered in response to AdvertisingSet.setAdvertisingParameters indicating
 result of the operation.
| Parameters | |
|---|---|
advertisingSet | 
        
          AdvertisingSet: The advertising set. | 
      
txPower | 
        
          int: tx power that will be used for this set. | 
      
status | 
        
          int: Status of the operation. | 
      
onAdvertisingSetStarted
public void onAdvertisingSetStarted (AdvertisingSet advertisingSet, int txPower, int status)
Callback triggered in response to BluetoothLeAdvertiser.startAdvertisingSet
 indicating result of the operation. If status is ADVERTISE_SUCCESS, then advertisingSet
 contains the started set and it is advertising. If error occurred, advertisingSet is null,
 and status will be set to proper error code.
| Parameters | |
|---|---|
advertisingSet | 
        
          AdvertisingSet: The advertising set that was started or null if error. | 
      
txPower | 
        
          int: tx power that will be used for this set. | 
      
status | 
        
          int: Status of the operation. | 
      
onAdvertisingSetStopped
public void onAdvertisingSetStopped (AdvertisingSet advertisingSet)
Callback triggered in response to BluetoothLeAdvertiser.stopAdvertisingSet indicating
 advertising set is stopped.
| Parameters | |
|---|---|
advertisingSet | 
        
          AdvertisingSet: The advertising set. | 
      
onPeriodicAdvertisingDataSet
public void onPeriodicAdvertisingDataSet (AdvertisingSet advertisingSet, int status)
Callback triggered in response to AdvertisingSet.setPeriodicAdvertisingData
 indicating result of the operation.
| Parameters | |
|---|---|
advertisingSet | 
        
          AdvertisingSet: The advertising set. | 
      
status | 
        
          int: Status of the operation. | 
      
onPeriodicAdvertisingEnabled
public void onPeriodicAdvertisingEnabled (AdvertisingSet advertisingSet, boolean enable, int status)
Callback triggered in response to AdvertisingSet.setPeriodicAdvertisingEnabled
 indicating result of the operation.
| Parameters | |
|---|---|
advertisingSet | 
        
          AdvertisingSet: The advertising set. | 
      
enable | 
        
          boolean  | 
      
status | 
        
          int: Status of the operation. | 
      
onPeriodicAdvertisingParametersUpdated
public void onPeriodicAdvertisingParametersUpdated (AdvertisingSet advertisingSet, int status)
Callback triggered in response to AdvertisingSet.setPeriodicAdvertisingParameters
 indicating result of the operation.
| Parameters | |
|---|---|
advertisingSet | 
        
          AdvertisingSet: The advertising set. | 
      
status | 
        
          int: Status of the operation. | 
      
onScanResponseDataSet
public void onScanResponseDataSet (AdvertisingSet advertisingSet, int status)
Callback triggered in response to AdvertisingSet.setAdvertisingData indicating result
 of the operation.
| Parameters | |
|---|---|
advertisingSet | 
        
          AdvertisingSet: The advertising set. | 
      
status | 
        
          int: Status of the operation. |