Experimental Android app demonstrating the use of Nearby Messages API for communicating between devices within close proximity of each other (within about 100 feet). The devices don't have to be on the same network, but they do have to be connected to the Internet.
- No need to sign up for anything
- Usernames are optional
- Only text-based chat is currently supported - URLs, emails, phone numbers, and addresses are clickable and will be opened with any installed app that supports them
Nearby uses a combination of Bluetooth, Bluetooth Low Energy, Wi-Fi and near-ultrasonic audio to communicate between devices.
Push notifications are not currently supported due to API limitations. You must have the app in the foreground to guarantee you will receive messages from devices around you.
The app is not meant to be used for extended periods of time. Nearby's use of radios and sensors will consume battery at a higher rate than usual. (Battery consumption will decrease with earshot mode - not yet implemented, but you could help. Remember, it is a fully open source app 😀)
- Get an API Key. You may reuse an existing Android Key, but to create a new one follow the steps below:
- Go to the Google Developers Console.
- Create or select a project.
- Name the API Key. E.g.
- Optionally apply Application and API restrictions. I highly encourage you to do it. Use
com.esdraslopez.android.nearbychatas the Application restriction and
Nearby Messages APIas the API restriction.
- Click on create.
- Place the key in your
gradle.properties (Global Properties)file like this:
Subscribe to Android Example 365
Get the latest posts delivered right to your inbox