mobi.voiceassistant.base
Class Response
java.lang.Object
mobi.voiceassistant.base.Response
- All Implemented Interfaces:
- Parcelable
public final class Response
- extends Object
- implements Parcelable
Method Summary |
PendingInput |
createPendingInput(CharSequence text)
|
PendingRequest |
createPendingRequest(int commandId,
int query)
Deprecated. Use createPendingRequest(String, int, int) |
PendingRequest |
createPendingRequest(int commandId,
String query)
Deprecated. Use createPendingRequest(String, int, String) |
PendingRequest |
createPendingRequest(String action,
int commandId,
int query)
|
PendingRequest |
createPendingRequest(String action,
int commandId,
String query)
|
Context |
createSessionContext(Context base)
|
int |
describeContents()
|
void |
enterModalQuestionScope(int moduleId)
|
void |
enterModalScope(int moduleId)
|
void |
enterQuestionScope(int moduleId)
|
void |
enterScope(int moduleId)
|
void |
enterScope(Scope scope)
|
ComponentName |
getComponent()
|
|
getContent()
|
Bundle |
getCookies(int mode)
|
Label |
getLabel()
|
Scope |
getScope()
|
Uri |
getUri()
|
Bundle |
peekCookies(int mode)
|
Response |
putCookie(int mode,
String key,
double value)
|
Response |
putCookie(int mode,
String key,
int value)
|
Response |
putCookie(int mode,
String key,
int[] value)
|
Response |
putCookie(int mode,
String key,
long value)
|
Response |
putCookie(int mode,
String key,
Parcelable value)
|
Response |
putCookie(int mode,
String key,
String value)
|
Response |
putMarshalCookie(int mode,
String key,
Object value)
|
Response |
putNullCookie(int mode,
String key)
|
Response |
putNullCookies(int mode,
String... keys)
|
Response |
putStringArrayListCookie(int mode,
String key,
ArrayList<String> value)
|
void |
setContent(Object content)
Sets the content to be presented to user. |
void |
setContents(Object... contents)
Same as setting array of object as content |
void |
setLabel(Label label)
|
void |
writeToParcel(Parcel parcel,
int flags)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CREATOR
public static final Parcelable.Creator<Response> CREATOR
COOKIE_MODE_AGENT
public static final int COOKIE_MODE_AGENT
- See Also:
- Constant Field Values
COOKIE_MODE_PACKAGE
public static final int COOKIE_MODE_PACKAGE
- See Also:
- Constant Field Values
COOKIE_MODE_GLOBAL
public static final int COOKIE_MODE_GLOBAL
- See Also:
- Constant Field Values
Response
public Response(Uri uri)
Response
public Response(Parcel parcel)
getComponent
public ComponentName getComponent()
getUri
public Uri getUri()
getContent
public <T> T getContent()
setContent
public void setContent(Object content)
- Sets the content to be presented to user.
Type of supported content depends on assistant application.
When assistant is in different android application package, content will be passed through parcel, so there may
be additional restrictions to content type.
- Parameters:
content
- Content to be presented to user- See Also:
Parcel.writeValue(java.lang.Object value)
setContents
public void setContents(Object... contents)
- Same as setting array of object as content
- See Also:
setContent(java.lang.Object contents)
putCookie
public Response putCookie(int mode,
String key,
double value)
putCookie
public Response putCookie(int mode,
String key,
int value)
putCookie
public Response putCookie(int mode,
String key,
int[] value)
putCookie
public Response putCookie(int mode,
String key,
long value)
putCookie
public Response putCookie(int mode,
String key,
Parcelable value)
putCookie
public Response putCookie(int mode,
String key,
String value)
putMarshalCookie
public Response putMarshalCookie(int mode,
String key,
Object value)
putStringArrayListCookie
public Response putStringArrayListCookie(int mode,
String key,
ArrayList<String> value)
putNullCookie
public Response putNullCookie(int mode,
String key)
putNullCookies
public Response putNullCookies(int mode,
String... keys)
getCookies
public Bundle getCookies(int mode)
peekCookies
public Bundle peekCookies(int mode)
createPendingInput
public PendingInput createPendingInput(CharSequence text)
createPendingRequest
@Deprecated
public PendingRequest createPendingRequest(int commandId,
int query)
- Deprecated. Use
createPendingRequest(String, int, int)
createPendingRequest
@Deprecated
public PendingRequest createPendingRequest(int commandId,
String query)
- Deprecated. Use
createPendingRequest(String, int, String)
createPendingRequest
public PendingRequest createPendingRequest(String action,
int commandId,
int query)
createPendingRequest
public PendingRequest createPendingRequest(String action,
int commandId,
String query)
createSessionContext
public Context createSessionContext(Context base)
enterScope
public void enterScope(Scope scope)
enterScope
public void enterScope(int moduleId)
enterQuestionScope
public void enterQuestionScope(int moduleId)
enterModalScope
public void enterModalScope(int moduleId)
enterModalQuestionScope
public void enterModalQuestionScope(int moduleId)
getScope
public Scope getScope()
getLabel
public Label getLabel()
setLabel
public void setLabel(Label label)
describeContents
public int describeContents()
- Specified by:
describeContents
in interface Parcelable
writeToParcel
public void writeToParcel(Parcel parcel,
int flags)
- Specified by:
writeToParcel
in interface Parcelable