Package com.dsi.ant.channel
Class NetworkKey
java.lang.Object
com.dsi.ant.channel.NetworkKey
- All Implemented Interfaces:
android.os.Parcelable
The network key used to gain access to the private network. This is passed to the
ANT Radio Service when acquiring a channel and if the key is valid, the
acquired channel will be assigned to the private network.
- Since:
- 4.3
-
Nested Class Summary
Nested classes/interfaces inherited from interface android.os.Parcelable
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final android.os.Parcelable.Creator<NetworkKey>
For ParcelableFields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
ConstructorsConstructorDescriptionNetworkKey
(byte[] networkKey) Constructs a Network Key from the given long network key byte array. -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
byte[]
Gets the raw byte array of the network key.int
hashCode()
toString()
void
writeToParcel
(android.os.Parcel dest, int flags)
-
Field Details
-
CREATOR
For Parcelable
-
-
Constructor Details
-
NetworkKey
public NetworkKey(byte[] networkKey) Constructs a Network Key from the given long network key byte array. Note: ANT Radio Service only supports receiving long (16-byte) network keys and the size of the given key will be validated when this object is passed to the ANT Radio Service.- Parameters:
networkKey
- The byte array containing the private network key.- Since:
- 4.3
-
-
Method Details
-
getRawNetworkKey
public byte[] getRawNetworkKey()Gets the raw byte array of the network key.- Returns:
- The byte array of the network key.
- Since:
- 4.3
-
hashCode
public int hashCode() -
equals
-
toString
-
describeContents
public int describeContents()- Specified by:
describeContents
in interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags) - Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
-