{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

SpeakEasyProtocol

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.

Summary

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

const Int
const Int
const Int
const Int
const Int

Public constructors

Public functions

java-static SpeakEasyProtocol!
fromBundle(b: Bundle!)

Decodes a bundle into a SpeakEasyProtocol object.

String!

Public properties

SpeakEasyProtocol.Find!
SpeakEasyProtocol.FindResult!
SpeakEasyProtocol.Publish!

Set based on type.

SpeakEasyProtocol.PublishResult!
SpeakEasyProtocol.Remove!
Int

Constants

FIND_RESULT_TYPE

const val FIND_RESULT_TYPEInt

FIND_TYPE

const val FIND_TYPEInt

PUBLISH_RESULT_TYPE

const val PUBLISH_RESULT_TYPEInt

PUBLISH_TYPE

const val PUBLISH_TYPEInt

REMOVE_TYPE

const val REMOVE_TYPEInt

Public constructors

SpeakEasyProtocol

SpeakEasyProtocol()

Public functions

fromBundle

java-static 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.

toString

fun toString(): String!

Public properties

find

val findSpeakEasyProtocol.Find!

findResult

val findResultSpeakEasyProtocol.FindResult!

publish

val publishSpeakEasyProtocol.Publish!

Set based on type.

publishResult

val publishResultSpeakEasyProtocol.PublishResult!

remove

val removeSpeakEasyProtocol.Remove!

type

val typeInt