Enum TalkbackState

    • Enum Constant Detail

      • IDLE

        public static final TalkbackState IDLE
        This is the default state. There is no pending talkback request and no talkback stream playing. This state requires no action, but is useful for updating any talkback status ui.
      • NEEDS_ACCEPT

        public static final TalkbackState NEEDS_ACCEPT
        This state means that there is a pending talkback request you must approve or reject.

        We recommend that you show a dialog asking the end user to plug in headphones, disable any silent mode and press accept or reject.

        You must invoke acceptTalkback(id) to start receiving the stream, or stopTalkback() to reject the request and return to IDLE.

      • ACCEPTED

        public static final TalkbackState ACCEPTED
        Talkback stream accepted. The server is connecting to the stream to relay it to you. This state requires no action, but it can be useful to signal to the end user that talkback is connecting. The state should soon transition to READY on success, or IDLE if the stream is no longer available.
      • PLAYING

        public static final TalkbackState PLAYING
        The Broadcaster is receiving audio, and has signaled to the server that playback has started, so the "caller" knows that there is a live talkback stream to this Broadcaster.

        We recommend that you show some small UI that indicates to the end user that there is an ongoing talkback stream. You can also let the end user stop the talkback stream by invoking stopTalkback().

    • Method Detail

      • values

        public static TalkbackState[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TalkbackState c : TalkbackState.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TalkbackState valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null