EgressReceiverService


abstract class EgressReceiverService : Service
kotlin.Any
   ↳ android.content.Context
   ↳ android.content.ContextWrapper
   ↳ android.app.Service
   ↳ android.app.privatecompute.EgressReceiverService

Base Service to be implemented by the partner agent proxy process to receive egress queries from a client running inside the Private Compute Core (PCC) sandbox.

To implement this service, you must extend this class and declare the service in your AndroidManifest.xml with the intent action SERVICE_INTERFACE and require the android.permission.BIND_PCC_EGRESS_SERVICE permission to ensure only the system can bind to it.

Summary

Constants
static String

The Intent action that a partner egress receiver service must respond to.

Inherited constants
Public constructors

Public methods
IBinder?
onBind(intent: Intent?)

Entry point for binding.

open Unit

Called when a query is received from a client running inside the Private Compute Core (PCC) sandbox.

Inherited functions

Constants

SERVICE_INTERFACE

static val SERVICE_INTERFACE: String

The Intent action that a partner egress receiver service must respond to. Add it to the intent-filter of the service in your manifest.

Value: "android.app.privatecompute.EgressReceiverService"

Public constructors

EgressReceiverService

EgressReceiverService()

Public methods

onBind

fun onBind(intent: Intent?): IBinder?

Entry point for binding. This method is final to prevent overriding, ensuring the system can securely route the AIDL binder.

Parameters
intent Intent?: This value may be null.
Return
IBinder? This value may be null.

onQueryReceived

open fun onQueryReceived(
    request: AssistantQueryRequest,
    callback: OutcomeReceiver<AssistantQueryResponse!, PccEgressException!>
): Unit

Called when a query is received from a client running inside the Private Compute Core (PCC) sandbox.

Note: This method is invoked on the main thread. Implementations should offload heavy work to a background thread/executor to avoid blocking the main thread.
This method must be called from the main thread of your app.

Parameters
request AssistantQueryRequest: The AssistantQueryRequest containing the query payload.
This value cannot be null.
callback OutcomeReceiver<AssistantQueryResponse!, PccEgressException!>: The OutcomeReceiver to return the result or error.
This value cannot be null.