FileDocCategorySizeDatePackage
BluetoothHealthAppConfiguration.javaAPI DocAndroid 5.1 API5289Thu Mar 12 22:22:10 GMT 2015android.bluetooth

BluetoothHealthAppConfiguration

public final class BluetoothHealthAppConfiguration extends Object implements android.os.Parcelable
The Bluetooth Health Application Configuration that is used in conjunction with the {@link BluetoothHealth} class. This class represents an application configuration that the Bluetooth Health third party application will register to communicate with the remote Bluetooth health device.

Fields Summary
private final String
mName
private final int
mDataType
private final int
mRole
private final int
mChannelType
public static final Parcelable.Creator
CREATOR
Constructors Summary
BluetoothHealthAppConfiguration(String name, int dataType)
Constructor to register the SINK role

param
name Friendly name associated with the application configuration
param
dataType Data Type of the remote Bluetooth Health device
hide

        mName = name;
        mDataType = dataType;
        mRole = BluetoothHealth.SINK_ROLE;
        mChannelType = BluetoothHealth.CHANNEL_TYPE_ANY;
    
BluetoothHealthAppConfiguration(String name, int dataType, int role, int channelType)
Constructor to register the application configuration.

param
name Friendly name associated with the application configuration
param
dataType Data Type of the remote Bluetooth Health device
param
role {@link BluetoothHealth#SOURCE_ROLE} or {@link BluetoothHealth#SINK_ROLE}
hide

        mName = name;
        mDataType = dataType;
        mRole = role;
        mChannelType = channelType;
    
Methods Summary
public intdescribeContents()

        return 0;
    
public booleanequals(java.lang.Object o)

        if (o instanceof BluetoothHealthAppConfiguration) {
            BluetoothHealthAppConfiguration config = (BluetoothHealthAppConfiguration) o;
            // config.getName() can never be NULL
            return mName.equals(config.getName()) &&
                    mDataType == config.getDataType() &&
                    mRole == config.getRole() &&
                    mChannelType == config.getChannelType();
        }
        return false;
    
public intgetChannelType()
Return the channel type associated with this application configuration.

return
One of {@link BluetoothHealth#CHANNEL_TYPE_RELIABLE} or {@link BluetoothHealth#CHANNEL_TYPE_STREAMING} or {@link BluetoothHealth#CHANNEL_TYPE_ANY}.
hide

        return mChannelType;
    
public intgetDataType()
Return the data type associated with this application configuration.

return
dataType

        return mDataType;
    
public java.lang.StringgetName()
Return the name of the application configuration.

return
String name

        return mName;
    
public intgetRole()
Return the role associated with this application configuration.

return
One of {@link BluetoothHealth#SOURCE_ROLE} or {@link BluetoothHealth#SINK_ROLE}

        return mRole;
    
public inthashCode()

        int result = 17;
        result = 31 * result + (mName != null ? mName.hashCode() : 0);
        result = 31 * result + mDataType;
        result = 31 * result + mRole;
        result = 31 * result + mChannelType;
        return result;
    
public java.lang.StringtoString()

        return "BluetoothHealthAppConfiguration [mName = " + mName +
            ",mDataType = " + mDataType + ", mRole = " + mRole + ",mChannelType = " +
            mChannelType + "]";
    
public voidwriteToParcel(android.os.Parcel out, int flags)


          
        out.writeString(mName);
        out.writeInt(mDataType);
        out.writeInt(mRole);
        out.writeInt(mChannelType);