RegistrationResponse


public final class RegistrationResponse
extends Object

java.lang.Object
   ↳ android.app.personalcontext.understander.RegistrationResponse


Response options for a prompt to enable/register a personal context understander. RegistrationResponse takes in a RegistrationRequest at construction and is sent via ERROR(PersonalContextManager.respondToUnderstanderRegistrationRequest(RegistrationResponse)/android.service.personalcontext.PersonalContextManager#respondToUnderstanderRegistrationRequest(android.app.personalcontext.understander.RegistrationResponse) PersonalContextManager.respondToUnderstanderRegistrationRequest(RegistrationResponse)). The response field is used to declare the user's intent. RESPONSE_PROCEED is used to indicate the user wants to move forward with the registration process. RESPONSE_CANCEL indicates the user wants to cancel the flow.

Summary

Constants

int RESPONSE_CANCEL

Cancel the understander registration request.

int RESPONSE_PROCEED

Proceed with registering the understander.

int RESPONSE_UNKNOWN

Unknown response to an understander registration request.

Public constructors

RegistrationResponse(RegistrationRequest request, int response)

Creates a new RegistrationResponse.

Public methods

RegistrationRequest getRequest()

Returns the RegistrationRequest associated with this response.

int getResponse()

Returns the response code.

Inherited methods

Constants

RESPONSE_CANCEL

Added in version 37.2
public static final int RESPONSE_CANCEL

Cancel the understander registration request.

Constant Value: 2 (0x00000002)

RESPONSE_PROCEED

Added in version 37.2
public static final int RESPONSE_PROCEED

Proceed with registering the understander.

Constant Value: 1 (0x00000001)

RESPONSE_UNKNOWN

Added in version 37.2
public static final int RESPONSE_UNKNOWN

Unknown response to an understander registration request.

Constant Value: 0 (0x00000000)

Public constructors

RegistrationResponse

Added in version 37.2
public RegistrationResponse (RegistrationRequest request, 
                int response)

Creates a new RegistrationResponse.

Parameters
request RegistrationRequest: This value cannot be null.

response int: Value is one of the following:

Public methods

getRequest

Added in version 37.2
public RegistrationRequest getRequest ()

Returns the RegistrationRequest associated with this response.

Returns
RegistrationRequest This value cannot be null.

getResponse

Added in version 37.2
public int getResponse ()

Returns the response code.

Returns
int Value is one of the following: