{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
public final class SpeakEasyProtocol
SpeakEasyProtocol abstracts away sending commands / interpreting responses from speakeasy via bundles.
SpeakEasy allows the registration, query, removal of IBinders from the shell user to android apps.
This bypasses the Android platform's typical dependency and lifecycle management of Services and IPC. Using Service objects defined in your Android manifest is the proper way to do IPC in Android and these mechanisms should only be used in test.
The dependencies of this class should be kept to a minimum and it should remain possible to use this class outside of an apk.
Nested types |
|
|---|---|
SpeakEasyProtocol.Find |
Represents a Find request to SpeakEasy. |
SpeakEasyProtocol.FindResult |
The result of a find operation on SpeakEasy. |
SpeakEasyProtocol.Publish |
Represents a publish command to speakeasy. |
SpeakEasyProtocol.PublishResult |
Represents a publish response from speakeasy. |
SpeakEasyProtocol.Remove |
Indicates a request to remove a IBinder from SpeakEasy. |
Constants |
|
|---|---|
static final @NonNull int |
|
static final @NonNull int |
|
static final @NonNull int |
|
static final @NonNull int |
|
static final @NonNull int |
|
Public fields |
|
|---|---|
final @NonNull SpeakEasyProtocol.Find |
|
final @NonNull SpeakEasyProtocol.FindResult |
|
final @NonNull SpeakEasyProtocol.Publish |
Set based on type. |
final @NonNull SpeakEasyProtocol.PublishResult |
|
final @NonNull SpeakEasyProtocol.Remove |
|
final @NonNull int |
|
Public methods |
|
|---|---|
static @NonNull SpeakEasyProtocol |
fromBundle(@NonNull Bundle b)Decodes a bundle into a SpeakEasyProtocol object. |
@NonNull String |
toString() |
@NonNull
public static SpeakEasyProtocol fromBundle(@NonNull Bundle b)
Decodes a bundle into a SpeakEasyProtocol object.
| Parameters | |
|---|---|
@NonNull Bundle b |
a Bundle (nullable) |
| Returns | |
|---|---|
SpeakEasyProtocol |
A SpeakEasyProtocol - or null if invalid. |