{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
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. |
Public functions |
|
|---|---|
SpeakEasyProtocol |
fromBundle(b: Bundle)Decodes a bundle into a SpeakEasyProtocol object. |
String |
toString() |
Public properties |
|
|---|---|
SpeakEasyProtocol.Find |
|
SpeakEasyProtocol.FindResult |
|
SpeakEasyProtocol.Publish |
Set based on type. |
SpeakEasyProtocol.PublishResult |
|
SpeakEasyProtocol.Remove |
|
Int |
|
fun fromBundle(b: Bundle): SpeakEasyProtocol
Decodes a bundle into a SpeakEasyProtocol object.
| Parameters | |
|---|---|
b: Bundle |
a Bundle (nullable) |
| Returns | |
|---|---|
SpeakEasyProtocol |
A SpeakEasyProtocol - or null if invalid. |