java.lang.Object | |
↳ | com.amazon.identity.auth.device.interactive.InteractiveRequest<T extends com.amazon.identity.auth.device.interactive.InteractiveListener<S, U, V>, S, U, V> |
![]() |
InteractiveRequest
is the base class for creating concrete interactive (out-of-app) requests. Each
interactive request should define as much of the configuration and options for an interactive API as desired.
Requests are bound to their listeners in two ways:
getRequestType()
. If desired, the request type can be dynamic values,
however they will are bounded by the same class types.Interactive requests also expose several convenience methods for Login With Amazon-enabled SDKs with interactive workflows, including the ability to:
openWorkflow(InteractiveRequest, ?, ?, ?>, String, String, Bundle)
.InteractiveListener
methods exposed on the request.Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
InteractiveRequest.Builder<W extends InteractiveRequest<?, ?, ?, ?>> | The base builder object for interactive requests. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Interactive requests require that they are made from a specific
RequestContext . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method only intended for use by Login With Amazon-enabled SDKs.
| |||||||||||
Each interactive request must be made from some Android Context.
| |||||||||||
This method only intended for use by Login With Amazon-enabled SDKs.
| |||||||||||
This API is intended only for use by Login With Amazon-enabled SDKs.
| |||||||||||
This method only intended for use by Login With Amazon-enabled SDKs.
| |||||||||||
Do not call this API, it is used internally by the SDK and may be subject to change without notice.
| |||||||||||
This method only intended for use by Login With Amazon-enabled SDKs.
| |||||||||||
This method only intended for use by Login With Amazon-enabled SDKs.
| |||||||||||
Do not call this API, it is used internally by the SDK and may be subject to change without notice.
| |||||||||||
Do not call this API, it is used internally by the SDK and may be subject to change without notice.
| |||||||||||
Do not call this API, it is used internally by the SDK and may be subject to change without notice.
| |||||||||||
This method only intended for use by Login With Amazon-enabled SDKs.
| |||||||||||
Do not call this API, it is used internally by the SDK.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Interactive requests require that they are made from a specific RequestContext
.
requestContext | Required. |
---|
This method only intended for use by Login With Amazon-enabled SDKs.
Convenience method to check if this request's RequestContext
has a corresponding listener registered.
ListenerNotFoundException | If there is no listener for this request registered. |
---|
Each interactive request must be made from some Android Context.
This method only intended for use by Login With Amazon-enabled SDKs.
Interactive requests must declare the type of their corresponding listener as the T type parameter and also must return that type's Class here in order to accommodate for Java's type erasure. They must be the same, otherwise the interactive request flow will fail.
This API is intended only for use by Login With Amazon-enabled SDKs.
Each interactive request must have a request context so that its listeners can be triggered.
This method only intended for use by Login With Amazon-enabled SDKs.
The Android lifecycle requires that instances of Activity and Fragment (where app developers will be making interactive requests from) may be destroyed and recreated at any time. This also means your InteractiveRequest subclass may get garbage collected and you could lose all data associated with the request object.
When an interactive request is started, this method will be called to associate the returned Bundle
with
the same request's response. When your request response is processed, LWA will return this bundle to your
BaseWorkflowListener
subclasses via getRequestExtras()
.
By default, this will return null.
Do not call this API, it is used internally by the SDK and may be subject to change without notice.
This method only intended for use by Login With Amazon-enabled SDKs.
Call this method with a cancellation object to short-circuit an interactive request before it is started. All
listeners registered to this request's RequestContext
will have their onCancel
called with
the given cancellation object.
cancellation | The cancellation object to pass to the listeners. |
---|
This method only intended for use by Login With Amazon-enabled SDKs.
Call this method with an error to short-circuit an interactive request before it is started. All listeners
registered to this request's RequestContext
will have their onError
called with
the given error.
error | The error to pass to the listeners. |
---|
Do not call this API, it is used internally by the SDK and may be subject to change without notice.
Do not call this API, it is used internally by the SDK and may be subject to change without notice.
Do not call this API, it is used internally by the SDK and may be subject to change without notice.
This method only intended for use by Login With Amazon-enabled SDKs.
Call this method with a result to short-circuit an interactive request before it is started. All listeners
registered to this request's RequestContext
will have their onSuccess
called with the given
result.
result | The result object to pass to the listeners. |
---|
Do not call this API, it is used internally by the SDK.
Updates the request's RequestContext
. This is only necessary to do when the request source may have
been recreated by the Android activity lifecycle.
requestContext | The new request context for this request. |
---|