# [Android Components](../../README.md) > Samples > Nearby Chat

A simple chat app that lets users of two nearby devices exchange messages.

To initiate a connection, one user must click on the Advertise button,
and the other user must click on the Discover button. (The order of
doing so does not matter.) Once the devices find each other, the users
will be prompted to accept a shared token, after which they can exchange messages.

## License

    This Source Code Form is subject to the terms of the Mozilla Public
    License, v. 2.0. If a copy of the MPL was not distributed with this
    file, You can obtain one at http://mozilla.org/MPL/2.0/
