Nearby Connections
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Nearby Connections API を使用すると、ネットワーク接続に関係なく、リアルタイムのデータの検出、接続、データ交換をアプリから行うことができます。Bluetooth や Wi-Fi などのテクノロジーを使用しており、アプリがこうしたデバイスの複雑性を隠して、付近のデバイスを検出して操作することに集中できるように設計されています。
次のような場合には、アプリに対して Nearby Connections API を選択する必要があります。
インターネット接続を必要とすることなく付近のデバイスを検出し、各オペレーションでネットワークのラウンドトリップを発生させる必要があります。
コンテンツをストリーミングするか、付近のデバイス間で任意のペイロードまたはファイルを送信する。
Wi-Fi Aware など、利用可能な場合は最新のピアツーピア テクノロジーを使用する。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-13 UTC。
[null,null,["最終更新日 2025-08-13 UTC。"],[[["\u003cp\u003eThe Nearby Connections API enables real-time data exchange between devices, regardless of internet access, using Bluetooth, Wi-Fi, and other technologies.\u003c/p\u003e\n"],["\u003cp\u003eThis API simplifies device discovery and interaction by abstracting away underlying technology complexities.\u003c/p\u003e\n"],["\u003cp\u003eChoose this API for scenarios requiring offline device discovery, content streaming, or leveraging peer-to-peer technologies like Wi-Fi Aware.\u003c/p\u003e\n"]]],[],null,["# Nearby Connections\n\nThe [Nearby Connections API](/nearby/connections/overview) allows apps to\ndiscover, connect to, and exchange data with nearby devices in real-time,\nregardless of network connectivity. It uses Bluetooth, Wi-Fi, and other\ntechnologies, and is designed to hide the complexity of these technologies\nso your app can focus on discovering and interacting with nearby devices.\n\nYou should choose the Nearby Connections API for your app when:\n\n- You want to discover nearby devices without requiring Internet connectivity\n and incurring the cost of a network round-trip on each operation.\n\n- You want to stream content or transmit arbitrary payloads or files between\n nearby devices.\n\n- You want to use the latest peer-to-peer technologies such as\n [Wi-Fi Aware](//developer.android.com/guide/topics/connectivity/wifi-aware)\n when available."]]