CompanionDeviceService.AttachSystemDataTransport Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attach the given bidirectional communication streams to be used for transporting system data between associated devices.
[Android.Runtime.Register("attachSystemDataTransport", "(ILjava/io/InputStream;Ljava/io/OutputStream;)V", "", ApiSince=34)]
[Android.Runtime.RequiresPermission("android.permission.DELIVER_COMPANION_MESSAGES")]
public void AttachSystemDataTransport (int associationId, System.IO.Stream in, System.IO.Stream out);
[<Android.Runtime.Register("attachSystemDataTransport", "(ILjava/io/InputStream;Ljava/io/OutputStream;)V", "", ApiSince=34)>]
[<Android.Runtime.RequiresPermission("android.permission.DELIVER_COMPANION_MESSAGES")>]
member this.AttachSystemDataTransport : int * System.IO.Stream * System.IO.Stream -> unit
Parameters
- associationId
- Int32
id of the associated device
- in
- Stream
already connected stream of data incoming from remote associated device
- out
- Stream
already connected stream of data outgoing to remote associated device
- Attributes
Remarks
Attach the given bidirectional communication streams to be used for transporting system data between associated devices.
The companion service providing these streams is responsible for ensuring that all data is transported accurately and in-order between the two devices, including any fragmentation and re-assembly when carried over a size-limited transport.
As an example, it's valid to provide streams obtained from a BluetoothSocket
to this method, since BluetoothSocket
meets the API contract described above.
This method passes through to CompanionDeviceManager#attachSystemDataTransport(int, InputStream, OutputStream)
for your convenience if you get callbacks in this class.
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.