BluetoothDevice.BluetoothAddress
  public
  static
  final
  
  class
  BluetoothDevice.BluetoothAddress
  
    extends Object
  
  
  
  
  
      implements
      
        Parcelable
      
  
  
| java.lang.Object | |
| ↳ | android.bluetooth.BluetoothDevice.BluetoothAddress | 
A data class for Bluetooth address and address type.
Summary
Inherited constants | 
|---|
Fields | |
|---|---|
    public
    static
    final
    Creator<BluetoothDevice.BluetoothAddress> | 
    
      CREATOR
      
  | 
  
Public constructors | |
|---|---|
      
      BluetoothAddress(String address, int addressType)
      
      
     | 
  |
Public methods | |
|---|---|
        
        
        
        
        
        int
     | 
  
    
      
      describeContents()
      
      
        Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.  | 
  
        
        
        
        
        
        String
     | 
  
    
      
      getAddress()
      
      
        Returns the address of this   | 
  
        
        
        
        
        
        int
     | 
  
    
      
      getAddressType()
      
      
        Returns the address type of this   | 
  
        
        
        
        
        
        void
     | 
  
    
      
      writeToParcel(Parcel out, int flags)
      
      
        Flatten this object in to a Parcel.  | 
  
Inherited methods | |
|---|---|
Fields
CREATOR
public static final Creator<BluetoothDevice.BluetoothAddress> CREATOR
Parcelable.Creator interface implementation.
Public constructors
BluetoothAddress
public BluetoothAddress (String address, int addressType)
| Parameters | |
|---|---|
address | 
        
          String: This value may be null. | 
      
addressType | 
        
          int: Value is BluetoothDevice.ADDRESS_TYPE_PUBLIC, BluetoothDevice.ADDRESS_TYPE_RANDOM, BluetoothDevice.ADDRESS_TYPE_ANONYMOUS, or BluetoothDevice.ADDRESS_TYPE_UNKNOWN | 
      
Public methods
describeContents
public int describeContents ()
Describe the kinds of special objects contained in this Parcelable
 instance's marshaled representation. For example, if the object will
 include a file descriptor in the output of writeToParcel(android.os.Parcel, int),
 the return value of this method must include the
 CONTENTS_FILE_DESCRIPTOR bit.
| Returns | |
|---|---|
int | 
        a bitmask indicating the set of special object types marshaled
 by this Parcelable object instance.
 Value is either 0 or CONTENTS_FILE_DESCRIPTOR | 
      
getAddress
public String getAddress ()
Returns the address of this BluetoothAddress.
 
For example, "00:11:22:AA:BB:CC".
| Returns | |
|---|---|
String | 
        Bluetooth address as string
 This value may be null. | 
      
getAddressType
public int getAddressType ()
Returns the address type of this BluetoothAddress, one of BluetoothDevice.ADDRESS_TYPE_PUBLIC, BluetoothDevice.ADDRESS_TYPE_RANDOM, or BluetoothDevice.ADDRESS_TYPE_UNKNOWN.
| Returns | |
|---|---|
int | 
        Bluetooth address type
 Value is BluetoothDevice.ADDRESS_TYPE_PUBLIC, BluetoothDevice.ADDRESS_TYPE_RANDOM, BluetoothDevice.ADDRESS_TYPE_ANONYMOUS, or BluetoothDevice.ADDRESS_TYPE_UNKNOWN | 
      
writeToParcel
public void writeToParcel (Parcel out, int flags)
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
out | 
        
          Parcel: This value cannot be null. | 
      
flags | 
        
          int: Additional flags about how the object should be written.
 May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.
 Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |