mobi.voiceassistant.base.content
Class Utterance
java.lang.Object
mobi.voiceassistant.base.content.Utterance
- All Implemented Interfaces:
- Parcelable
public final class Utterance
- extends Object
- implements Parcelable
This class is used to couple speech with other content like RemoteViews
.
To couple speech with CharSequence
it's better to use SpeechTextUtils
factory
- See Also:
SpeechTextUtils
,
Response.setContent(Object)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CREATOR
public static final Parcelable.Creator<Utterance> CREATOR
Utterance
public Utterance(Object content,
CharSequence speech)
- Base constructor.
- Parameters:
content
- The contentspeech
- The speech
getContent
public <T> T getContent()
- Returns:
- Content that was passed to constructor
- See Also:
Response.getContent()
getSpeech
public CharSequence getSpeech()
- Returns:
- Speech that was passed to constructor
describeContents
public int describeContents()
- Specified by:
describeContents
in interface Parcelable
writeToParcel
public void writeToParcel(Parcel parcel,
int flags)
- Specified by:
writeToParcel
in interface Parcelable