EgressReceiverService


public abstract class EgressReceiverService
extends Service

java.lang.Object
   ↳ 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

String SERVICE_INTERFACE

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

Inherited constants

Public constructors

EgressReceiverService()

Public methods

final IBinder onBind(Intent intent)

Entry point for binding.

void onQueryReceived(AssistantQueryRequest request, OutcomeReceiver<AssistantQueryResponsePccEgressException> callback)

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

Inherited methods

Constants

SERVICE_INTERFACE

Added in API level 10000
public static final String SERVICE_INTERFACE

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

Constant Value: "android.app.privatecompute.EgressReceiverService"

Public constructors

EgressReceiverService

public EgressReceiverService ()

Public methods

onBind

Added in API level 10000
public final IBinder onBind (Intent intent)

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.

Returns
IBinder This value may be null.

onQueryReceived

Added in API level 10000
public void onQueryReceived (AssistantQueryRequest request, 
                OutcomeReceiver<AssistantQueryResponsePccEgressException> callback)

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: The OutcomeReceiver to return the result or error.
This value cannot be null.