Class BtDeviceInfo

  • All Implemented Interfaces:
    android.os.Parcelable
    Direct Known Subclasses:
    BtScannerDeviceInfo

    public class BtDeviceInfo
    extends java.lang.Object
    implements android.os.Parcelable
    Class that provides more information about Remote device details
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface android.os.Parcelable

        android.os.Parcelable.ClassLoaderCreator<T extends java.lang.Object>, android.os.Parcelable.Creator<T extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static android.os.Parcelable.Creator<BtDeviceInfo> CREATOR  
      • Fields inherited from interface android.os.Parcelable

        CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BtDeviceInfo​(android.os.Parcel in)  
        BtDeviceInfo​(BtDeviceInfo obj)
      copy constructor of the class that creates object using other BtDeviceInfo object
        BtDeviceInfo​(java.lang.String identityAddress)
      constructor of the class that creates object using identityAddress as input.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int describeContents()  
      boolean equals​(java.lang.Object o)  
      java.lang.String getIdentityAddress()
      Get BT address of remote device
      java.lang.String getName()
      Get the friendly name of remote device
      int getPeripheralType()
      Get the type of remote peripheral connected to DUT.
      java.lang.String getSerialNumber()
      Get serial number of remote device.
      int hashCode()  
      void setName​(java.lang.String name)
      Set friendly name of remote device for reference in local DUT See also getName()
      void setPeripheralType​(int peripheralType)
      Set the type of remote peripheral connected to DUT.
      void setSerialNumber​(java.lang.String serialNumber)
      Set serial number of remote device.
      java.lang.String toString()  
      void writeToParcel​(android.os.Parcel dest, int flags)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • CREATOR

        public static final android.os.Parcelable.Creator<BtDeviceInfo> CREATOR
    • Constructor Detail

      • BtDeviceInfo

        public BtDeviceInfo​(BtDeviceInfo obj)
        copy constructor of the class that creates object using other BtDeviceInfo object
        Parameters:
        obj - object instance of the class or other class derived from the class
      • BtDeviceInfo

        public BtDeviceInfo​(java.lang.String identityAddress)
        constructor of the class that creates object using identityAddress as input.
        Parameters:
        identityAddress - MAC address of remote device
      • BtDeviceInfo

        protected BtDeviceInfo​(android.os.Parcel in)
    • Method Detail

      • getIdentityAddress

        public java.lang.String getIdentityAddress()
        Get BT address of remote device
        Returns:
        Bluetooth MAC address of remote device
      • toString

        @NonNull
        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getName

        public java.lang.String getName()
        Get the friendly name of remote device
        Returns:
        name of remote device
      • setName

        public void setName​(@NonNull
                            java.lang.String name)
        Set friendly name of remote device for reference in local DUT See also getName()
        Parameters:
        name - name of remote device
      • getSerialNumber

        public java.lang.String getSerialNumber()
        Get serial number of remote device. Note: only legacy pairing devices' serial number would be valid and provided.
        Returns:
        string format of remote device's serial number
      • setSerialNumber

        public void setSerialNumber​(@NonNull
                                    java.lang.String serialNumber)
        Set serial number of remote device. See also getSerialNumber()
        Parameters:
        serialNumber - string format of remote device's serial number
      • getPeripheralType

        public int getPeripheralType()
        Get the type of remote peripheral connected to DUT. This identification will be based on class of device that remote peripheral exhibits during discovery or connection process.
        Returns:
        type of remote peripheral that is communicating with DUT. See BtInsightConstants.PeripheralType
      • setPeripheralType

        public void setPeripheralType​(int peripheralType)
        Set the type of remote peripheral connected to DUT. See getPeripheralType()
        Parameters:
        peripheralType - type of remote peripheral
      • describeContents

        public int describeContents()
        Specified by:
        describeContents in interface android.os.Parcelable
      • writeToParcel

        public void writeToParcel​(android.os.Parcel dest,
                                  int flags)
        Specified by:
        writeToParcel in interface android.os.Parcelable