Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dan3143 committed Aug 10, 2020
2 parents 4ebda87 + bc36442 commit 822f453
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,16 @@ This is a plugin for Unity that enables Bluetooth communication for Android devi
## How to use
Just import `android-bluetooth-plugin.unitypackage` into your project, and use the `BluetoothServer` and `BluetoothClient` classes at your convenience.

For example, if you want to start a server that sends "Hello" to any client that connects to it, you could attacth this to your script:

```c#
BluetoothServer server = new BluetoothServer();
server.Start();
server.DeviceStateChanged += (sender, e) => {
if (e.IsConnected) {
server.SendTo("Hello", e.Sender.address);
}
}
```

You can check the documentation in [the wiki](https://github.com/dan3143/android-bluetooth-plugin/wiki) for more information.

0 comments on commit 822f453

Please sign in to comment.