Language

PccClient.SendData(Bundle) Method

Definition

Sends a Bundle of data to the connected PCC service.

[Android.Runtime.Register("sendData", "(Landroid/os/Bundle;)V", "GetSendData_Landroid_os_Bundle_Handler", ApiSince=37)]
public virtual void SendData(Android.OS.Bundle data);
[<Android.Runtime.Register("sendData", "(Landroid/os/Bundle;)V", "GetSendData_Landroid_os_Bundle_Handler", ApiSince=37)>]
abstract member SendData : Android.OS.Bundle -> unit
override this.SendData : Android.OS.Bundle -> unit

Parameters

data
Bundle

The Bundle of data to send.

Attributes

Exceptions

if SendData is called after the service has been killed by the system.

if the PCC service is unavailable for any other reason, or if the package name from the passed context is not associated with the calling app's UID. In the latter case, the cause is a SecurityException.

if the Bundle contains unsafe data types and the caller isn't allowed two-way communication with PCC components. To enforce a strictly one-way data flow, the Bundle is sanitized to prevent objects that can establish a two-way communication channel, such as IBinder and Messenger. Allowed data types are primitives and their arrays (e.g., int, char, boolean, String, byte[]); PersistableBundle; read-only ParcelFileDescriptor; SharedMemory (which must be read-only or is set to read-only); Bitmap; custom Parcelable objects serialized as byte[]; and nested Bundles, which are sanitized recursively. This exception is thrown if the nesting depth exceeds 100.

Remarks

Sends a Bundle of data to the connected PCC service. The Bundle is sanitized to enforce one-way data flow if the caller isn't allowed two-way communication with PCC components.

Android reference for android.app.privatecompute.PccClient.sendData.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to