메일링 리스트에 가입하여 Nearby에 관한 소식 및 공지사항을 확인하세요.
개요
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Nearby Messages API는 인터넷에 연결된 Android 및 iOS 기기 간에 작은 바이너리 페이로드를 전달할 수 있는 게시-구독 API입니다. 기기가 동일한 네트워크에 연결되어 있지 않아도 되지만 인터넷에 연결되어 있어야 합니다.
Nearby는 저전력 블루투스를 사용하여 기기 간에 시간별로 고유한 페어링 코드를 통신합니다. 서버는 동일한 페어링 코드를 감지하는 기기 간의 메시지 교환을 지원합니다. 기기가 근처 기기의 페어링 코드를 감지하면 유효성 검사를 위해 페어링 코드를 Nearby Messages 서버로 전송하고 애플리케이션의 현재 구독 집합에 전송할 메시지가 있는지 확인합니다.
근처 메시지는 인증되지 않으며 Google 계정이 필요하지 않습니다.
데이터 교환의 정확한 메커니즘은 출시마다 다를 수 있습니다. 다음 시퀀스는 메시지 교환으로 이어지는 이벤트를 보여줍니다.
게시 앱은 바이너리 페이로드 (메시지)를 시간상 고유한 페어링 코드 (토큰)와 연결하도록 요청합니다. 서버는 메시지 페이로드와 토큰 간에 임시 연결을 만듭니다.
게시 기기는 저전력 블루투스를 사용하여 토큰을 근처 기기에서 감지할 수 있도록 합니다. 게시 기기는 저전력 블루투스를 사용하여 다른 기기의 토큰을 검색합니다.
구독 앱은 정기 결제를 토큰과 연결하고 저전력 블루투스를 사용하여 토큰을 게시자에게 전송하고 게시자의 토큰을 감지합니다.
한쪽에서 다른 쪽의 토큰을 감지하면 서버에 이를 보고합니다.
서버는 두 기기가 모두 공통 토큰과 연결되어 있고 호출 앱에서 사용하는 API 키가 Google 개발자 콘솔의 동일한 프로젝트와 연결되어 있는 경우 두 기기 간의 메시지 교환을 지원합니다.
Google Play 서비스 Nearby SDK를 사용하면 환경을 개선하기 위해 사용 분석이 수집됩니다.
- 성능 측정항목: Nearby SDK를 사용할 때 게시 및 구독 기간과 수신된 메시지 수가 수집됩니다.
- 기기 정보: 기기 모델, 국가, 빌드 버전, 애플리케이션 패키지 이름이 수집되어 성능 측정항목과 연결되어 지역별 및 기기별 슬라이스를 식별합니다.
- Nearby Messages 게시: Nearby Messages를 통해 게시된 데이터는 메시지가 더 이상 게시되지 않을 때까지 Google에 저장됩니다. 이 데이터는 기기 근처에 있는 구독자와 공유됩니다.
최종 사용자는 설정 > Google > 사용 및 진단으로 이동하여 이 수집을 허용하거나 거부할 수 있습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-09-04(UTC)
[null,null,["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eNearby Messages, a publish-subscribe API, enables the exchange of small data payloads between nearby Android and iOS devices over the internet using Bluetooth Low Energy.\u003c/p\u003e\n"],["\u003cp\u003eThis API, set to be deprecated in December 2023, is unauthenticated, doesn't require a Google account, and leverages a unique pairing code system for device discovery and message delivery.\u003c/p\u003e\n"],["\u003cp\u003eGoogle collects performance metrics, device information, and published message data to improve the service; however, users can control this data collection through their device settings.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers are encouraged to migrate to Nearby Connections for continued support and functionality.\u003c/p\u003e\n"]]],[],null,["# Overview\n\n| **Warning:** Nearby Messages is deprecated and will stop working as of December 2023. Please migrate to [Nearby Connections](//developers.google.com/nearby/connections/overview) for further support.\n\nThe Nearby Messages API is a publish-subscribe API that lets you pass small\nbinary payloads between internet-connected Android and iOS devices. The devices\ndon't have to be on the same network, but they do have to be connected to the\nInternet.\n\nNearby uses Bluetooth Low Energy to communicate a unique-in-time pairing code\nbetween devices. The server facilitates message exchange between devices that\ndetect the same pairing code. When a device detects a pairing code from a nearby\ndevice, it sends the pairing code to the Nearby Messages server for validation,\nand to check whether there are any messages to deliver for the application's\ncurrent set of subscriptions.\n\nNearby Messages is unauthenticated and does not require a Google Account.\n\nThe exact mechanism for data exchange may vary from release to release. The\nfollowing sequence shows the events leading to message exchange:\n\n1. A publishing app makes a request to associate a binary payload (the message)\n with a unique-in-time pairing code (token). The server makes a temporary\n association between the message payload and the token.\n\n2. The publishing device uses Bluetooth Low Energy to make the token detectable\n by nearby devices. The publishing device also uses Bluetooth Low Energy to scan\n for tokens from other devices.\n\n3. A subscribing app associates its subscription with a token and uses Bluetooth\n Low Energy to send its token to the publisher, and to detect the publisher's\n token.\n\n4. When either side detects the other's token, it reports it to the server.\n\n5. The server facilitates message exchange between two devices when both are\n associated with a common token, and the API keys used by the calling apps are\n associated with the same project in the [Google Developers Console](https://console.developers.google.com/).\n\nWhen using the Google Play services Nearby SDK, usage analytics are collected to\nimprove the experience.\n\n- **Performance metrics:** The duration of publishes and subscriptions and the number of messages received is collected when using the Nearby SDK.\n- **Device information:** Device model, country, build version and the application package name are collected and associated with the performance metrics to identify regional and device-specific slices.\n- **Nearby Messages publishes:** Data published through Nearby Messages is stored by Google until the message is no longer published. This data is shared with subscribers who are near the device.\n\nEnd users can allow or deny this collection by navigating to Settings \\\u003e Google \\\u003e\nUsage \\& diagnostics."]]