블루투스를 사용하는 것이 좋습니다. 데이터가 클라우드에 백업됩니다. 블루투스를 사용할 수 있는 경우 이 백업은 비동기식으로 실행됩니다.
예, 읽기 및 쓰기 모두
메시지 클라이언트
지속성 없음 및 재시도 없음
아니요
블루투스가 선호되지만 Wi-Fi가 유일한 연결 유형인 경우 Wi-Fi를 사용할 수 있습니다.
아니요
채널 클라이언트
지속성 없음 (연결 지향형)
예
블루투스가 선호되지만 Wi-Fi가 유일한 연결 유형인 경우 Wi-Fi를 사용할 수 있습니다.
아니요
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-08-17(UTC)
[null,null,["최종 업데이트: 2025-08-17(UTC)"],[],[],null,["# Choose a client type\n\nThe Wear OS data layer APIs consist of several different types of clients, which\nare useful for different types of data and during different connectivity\nconditions.\n\nThis page introduces each client type, and it includes a table that compares the\ncapabilities of the different clients. Using this information, you can select\nthe set of client types that works best for your app.\n\nData client\n-----------\n\nA [`DataClient`](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataClient) object lets you read or write to a [`DataItem`](https://developers.google.com/android/reference/com/google/android/gms/wearable/DataItem) or\n[`Asset`](https://developers.google.com/android/reference/com/google/android/gms/wearable/Asset):\n\n- Each `DataItem` is a unit of information that's broadcast and synchronized\n across all nearby devices that a user owns. A `DataItem` is stored persistently,\n and your device can read its contents until the data item is deleted.\n\n- An `Asset` is meant for larger data payloads, such as images or media files.\n\nMessage client\n--------------\n\nA [`MessageClient`](https://developers.google.com/android/reference/com/google/android/gms/wearable/MessageClient) object can send messages and is good for remote procedure\ncalls (RPC), such as using a Wear OS device to control the version of your app\nthat's installed on a handheld device.\n\nMessages are great for one-way requests using `sendMessage()`, or for a\nrequest-and-response communication model using `sendRequest()`. Unlike with data\nclients, message clients need the nodes to be connected to the network in order\nto send messages.\n\nThe `sendMessage()` method is a best effort to deliver to the remote node, and\nit doesn't contain any built-in retry mechanism. If the target device\ndisconnects before the network transfer starts, the method returns\n`TARGET_NODE_NOT_CONNECTED`.\n| **Note:** To help preserve power, consider sending messages only to nearby devices.\n\nChannel client\n--------------\n\nA [`ChannelClient`](https://developers.google.com/android/reference/com/google/android/gms/wearable/ChannelClient) object provides stream-oriented communication between\ndevices. A *channel* is a bidirectional communication pipe between two nodes,\nwhich is useful for use cases such as the following:\n\n- Transfer data files between two or more connected devices when the internet isn't available. `ChannelClient` saves disk space over `DataClient`, which creates a copy of the assets on the local device before synchronizing with connected devices.\n- Reliably send a file that's too large to send using a `MessageClient`.\n- Transfer streamed data, such as voice data from the microphone.\n\nAfter you open a channel, you can send and receive data in a continuous byte\nstream, rather than the discrete `DataItem` units that data clients require.\n\nYou're responsible for managing the data flow and keeping data consistent.\nChannel clients don't offer the same level of automatic data synchronization\nthat data clients do.\n\nClient comparison\n-----------------\n\nThe following table compares the capabilities of the different clients:\n\n| Client type | Data persistence | Supports data larger than 100 KB? | Network to use | Works offline? |\n|--------------------|--------------------------------------|--------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|------------------------------|\n| **Data client** | Data is persisted indefinitely | Yes (use [`Asset`](https://developers.google.com/android/reference/com/google/android/gms/wearable/Asset) objects) | Bluetooth preferred. Data is backed up to the cloud; if Bluetooth is available, this backup is done asynchronously | Yes, for both read and write |\n| **Message client** | No persistence and no retry | No | Bluetooth preferred, but can use Wi-Fi if it's the only type of connection available | No |\n| **Channel client** | No persistence (connection-oriented) | Yes | Bluetooth preferred, but can use Wi-Fi if it's the only type of connection available | No |"]]