Class NetworkKey

java.lang.Object
com.dsi.ant.channel.NetworkKey
All Implemented Interfaces:
android.os.Parcelable

public class NetworkKey extends Object implements 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

    Fields
    Modifier and Type
    Field
    Description
    static final android.os.Parcelable.Creator<NetworkKey>
    For Parcelable

    Fields inherited from interface android.os.Parcelable

    CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
  • Constructor Summary

    Constructors
    Constructor
    Description
    NetworkKey(byte[] networkKey)
    Constructs a Network Key from the given long network key byte array.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    boolean
     
    byte[]
    Gets the raw byte array of the network key.
    int
     
     
    void
    writeToParcel(android.os.Parcel dest, int flags)
     

    Methods inherited from class java.lang.Object

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

    • CREATOR

      public static final android.os.Parcelable.Creator<NetworkKey> 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()
      Overrides:
      hashCode in class Object
      Since:
      4.3
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      Since:
      4.3
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Since:
      4.3
    • 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