Package com.zello.sdk

Class Contact

java.lang.Object
com.zello.sdk.Contact

public class Contact extends Object
The Contact class represents a contact of the current user. A Contact can be another user, a radio gateway, a group channel or a dynamic channel (see ContactType).
  • Constructor Details

    • Contact

      public Contact()
  • Method Details

    • reset

      public void reset()

      Resets the Contact instance back to the default values.

      This method only resets the values for this copied instance of the Contact.

    • clone

      @NonNull public Contact clone()
    • isValid

      public boolean isValid()
      Check if the object is empty.
      Returns:
      true if the object represents a valid contact.
    • getName

      @Nullable public String getName()

      Returns the identifying name of the Contact.

      For and @link ContactType#GROUP the value is the channel name. For ContactType.USER and ContactType.GATEWAY the value is the username. For ContactType.CONVERSATION the value is a unique conversation ID.

      Returns:
      Name of the Contact.
    • getFullName

      @Nullable public String getFullName()
      Returns the full name of the Contact.
      Returns:
      Nullable; Full name of the Contact.
    • getDisplayName

      @Nullable public String getDisplayName()

      Returns the display name for the Contact.

      Use this function if you need to show the contact on the screen as it uses the best available data to build the human-readable name.

      Returns:
      Nullable; Display Name for the Contact.
    • getType

      @NonNull public ContactType getType()
      Returns the ContactType for the Contact.
      Returns:
      ContactType for the Contact.
    • getStatus

      @NonNull public ContactStatus getStatus()
      Returns the ContactStatus for the Contact.
      Returns:
      ContactStatus for the Contact.
    • getStatusMessage

      @Nullable public String getStatusMessage()
      Returns the custom status message for the Contact.
      Returns:
      Nullable; The status message for the Contact.
    • getUsersCount

      public int getUsersCount()

      Returns the number of online users in the channel.

      For ContactType.CHANNEL. ContactType.GROUP and and ContactType.CONVERSATION this value is the number of users online in the channel or group, respectively. For ContactType.USER and ContactType.GATEWAY this value is not defined (0 is returned).

      Returns:
      number of online users under the Contact for the ContactType.
    • getUsersTotal

      public int getUsersTotal()

      Returns the number of total users in the channel.

      For ContactType.GROUP and ContactType.CONVERSATION this value is the number of total users in the channel or group, respectively. For ContactType.USER, ContactType.GATEWAY and ContactType.CHANNEL this value is not defined (0 is returned).

      Returns:
      number of total users under the Contact for the ContactType.
    • getTitle

      @Nullable public String getTitle()

      Returns the title for the Contact.

      For ContactType.CHANNEL and ContactType.GROUP this value is not defined (null is returned)

      Returns:
      Nullable; The title for the Contact.
    • getMuted

      public boolean getMuted()
      Returns whether the Contact is muted or not.
      Returns:
      boolean indicating if the Contact is muted.
    • getNoDisconnect

      public boolean getNoDisconnect()
      Returns whether the channel has the no disconnect setting enabled or not.

      For ContactType.USER, ContactType.GATEWAY and ContactType.CONVERSATION this value is not defined (false is returned).

      Returns:
      boolean indicating if the Contact has the no disconnect setting enabled.