Demonstrates streaming audio with the Nearby.Connections API to other nearby devices.
This sample uses the Gradle build system. To build this project, import the project into Android Studio before running it on (at least) 2 devices. This project comes with 2 build variants, Manual and Automatic, that demonstrate different ways of connecting the two devices. They can be toggled between in the Build Variants tab within Android Studio.
In the manual build variant, shake one device to begin advertising. As long as the app is open, other nearby devices should connect to it shortly. To speak, hold down the volume keys and your voice will be transmitted to the other devices you have connected to.
This demonstrates a star network, where one device advertises to a group of devices nearby.
In the automatic build variant, devices simultaneously advertise and discover. Devices will begin to pair up as they connect to the first device they see. To speak, hold down the volume keys and your voice will be transmitted to the paired device.
This demonstrates a point to point network, where one device transmits a high bandwidth Payload to one other device.
If you've found an error in these samples, please file an issue in this repo.
For providing feedback about Nearby.Connections, use the
SEND FEEDBACK link on
the Nearby Connections API for Android
Patches are encouraged, and may be submitted according to the instructions in CONTRIBUTING.md.
Please read and follow the steps in the CONTRIBUTING.md
compile fileTree(dir: 'libs', include: ['*.jar'])