[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Cross device SDK\n\nThe Cross device SDK makes it easier for developers to create apps that are\ncompatible across multiple devices. The SDK simplifies the development of rich\nand engaging multi-device experiences by combining various connectivity\ntechnologies into one toolkit. Previously, developers needed to independently\nwork with connectivity frameworks like Bluetooth and Wi-Fi to create\nmulti-device experiences. Now, developers can focus on the most important parts\nof the user experience while the SDK handles these lower level technologies.\n\nThis SDK is part of our larger\n[multi-device development toolkit](https://developer.android.com/multi-device-development)\nthat includes emulator support, profiling, and more. The Cross device SDK\nenables the following core functionality:\n\n- Device discovery and authorization\n- Secure connections and data transfers\n- Multi-device sessions\n\n| **Note:** For Developer Preview, the Cross device SDK only supports interactions between two devices at a time.\n\nSome examples of applications and experiences that you can build using this SDK\ninclude multiplayer gaming, seamless switching between devices in productivity\napps, and group food ordering.\n\nWhen developing the Cross device SDK, we followed three basic principles to\ncreate an abstraction layer that safely and respectfully accelerates the\ndevelopment of multi-device apps and experiences. Those principles are:\n\n- Ubiquitous: The SDK should work on every device possible, starting with phones and tablets.\n- Modular: Developers should be able to mix the SDK with other solutions.\n- Empowering: The SDK does not restrict you to specific cross-device experiences, but rather allows you to build your own features and experiences.\n\nUse cases\n---------\n\n| **Note:** Developer Preview currently supports phone and tablet experiences. Additional devices are not supported in Developer Preview, but we hope to support them in future releases.\n\nWhen discussing cross-device use cases, we consider two main categories:\npersonal and communal experiences.\n\n### Personal experiences\n\nPersonal experiences are built around a single user identity on multiple\ndevices, such as mobile phones, watches, TVs, and/or cars. These experiences\nhelp users more effectively connect the various devices they own. For instance:\n\n- Complete a movie rental or purchase on your TV by using your phone to enter your form of payment.\n- Start reading a long article on your phone and finish reading it on your tablet without losing your place.\n\n### Communal experiences\n\nCommunal experiences are enjoyed between a user and others around them. For\nexample:\n\n- Share a map location as a passenger directly with your friend's car.\n- Share your Sunday bike route with others that you're biking with.\n- Collect items for a group food order without passing your phone around.\n- Take a group vote for the next TV show to watch together.\n\n#### Media and other experiences\n\nThere are also multi-device experiences, such as continuous media controls and\nauthentication, that could prompt discovering devices and passing data between\nparticipants. For these use cases, we have existing frameworks and SDKs that\nmight be a better fit:\n\n- [Cast SDK](https://developers.google.com/cast) for media casting to other devices.\n- [Media sessions](https://developer.android.com/guide/topics/media-apps/working-with-a-media-session#maintain-state) for continuous playback.\n- [Block Store](https://developers.google.com/identity/blockstore/android) for authentication.\n- [Companion Device Manager](https://developer.android.com/guide/topics/connectivity/companion-device-pairing) for discovering and pairing companion devices such as fitness trackers or headphones.\n\nTogether with the Cross device SDK, these APIs and technologies allow you to\nbuild unique and seamless multi-device user experiences in your apps.\n\nDeveloper Preview limitations\n-----------------------------\n\nAs this is a Developer Preview version of the SDK, note the following:\n\n- The API surfaces are subject to change.\n- The Cross device SDK is NOT to be used in production applications.\n\nCurrently supported platforms and surfaces are limited to Android mobile and\ntablet devices.\n\nWe encourage you to share your feedback and suggestions. Please\n[submit bug reports here](https://issuetracker.google.com/issues/new?component=1205991&template=1706309).\n\nHow it works\n------------\n\nThe Cross device SDK is a software abstraction layer that enables both\nplatform-driven and developer-driven multi-device experiences by leveraging\nvarious wireless technologies such as Bluetooth, Wi-Fi, and ultra-wideband. This\nabstraction allows developers to focus on the most important parts of the user\nexperience while the SDK handles underlying aspects of platform capabilities,\ndevice discovery, authentication, and compatibility. \n**Figure 1**: Cross device SDK architecture.\n\n\u003cbr /\u003e\n\nFor most application developers, we recommend using the Multi-Device Sessions\nAPI. This API allows app user experiences to be transferred to or shared with\nother devices. However, if you need more granularity or customization for your\ncross-device experiences, the standalone Device Discovery and Secure Connections\nAPIs are available.\n\nThe Cross device SDK is open-source and will be available for different Android\nsurfaces and non-Android ecosystem devices (ChromeOS, Windows, iOS). The goal\nof the SDK is to leverage existing technologies and platform capabilities while\nsimplifying the development of multi-device experiences for app developers."]]