Skip to content

Plugin to leverage the Google Nearby Messages API for communication with nearby devices.

License

Notifications You must be signed in to change notification settings

amontech/capacitor-google-nearby-messages

 
 

Repository files navigation

Nearby Messages

The Nearby Messages API is a publish-subscribe API that lets you pass small binary payloads between internet-connected Android and iOS devices. The devices don't have to be on the same network, but they do have to be connected to the Internet.

Nearby uses a combination of Bluetooth, Bluetooth Low Energy, Wi-Fi and near-ultrasonic audio to communicate a unique-in-time pairing code between devices. The server facilitates message exchange between devices that detect the same pairing code. When a device detects a pairing code from a nearby device, it sends the pairing code to the Nearby Messages server for validation, and to check whether there are any messages to deliver for the application’s current set of subscriptions.

Overview

Android

To use the Nearby Messages APIs, you need a Google Account. This is so that you, the developer, can enable the Nearby API in the next step (your users will not need to have a Google account). If you already have an account, then you're all set. You may also want a separate Google Account for testing purposes.

Get an API key, then configure your manifest with the API Key generated:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.google.sample.app" >
    <application ...>
        <meta-data
            android:name="com.google.android.nearby.messages.API_KEY"
            android:value="API_KEY" />
        <activity>
        ...
        </activity>
    </application>
</manifest>

Get Started

iOS

To use the Nearby Messages APIs, you need a Google Account. If you already have an account, then you're all set. You may also want a separate Google Account for testing purposes.

Get an API key, then pass it as the apiKey argument in the initialize method.

Get Started

cd ios
pod repo update
pod install
pod update

About

Plugin to leverage the Google Nearby Messages API for communication with nearby devices.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 41.4%
  • Swift 22.7%
  • Objective-C 19.2%
  • TypeScript 14.5%
  • Ruby 0.9%
  • JavaScript 0.8%
  • C 0.5%