Skip to content

Commit

Permalink
Update README for recent changes (#9)
Browse files Browse the repository at this point in the history
- Mention Maven publication
 - Mention modern Bluetooth permissions which should be checked and configured
 - Add a simplified typical flow
 - Add OHF badge
  • Loading branch information
jpelgrom authored Oct 12, 2024
1 parent a6811b0 commit 2b7e2d8
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
# Android SDK for Improv Wi-Fi
## Installation
For now this library is not published through maven. For now you can take the AAR from the [Latest Release](https://github.com/improv-wifi/sdk-android/releases/latest) and place it in your `libs` folder of your applicaiton and add it as a file dependency.
Recent releases of the library are published on Maven Central, and each release of the library includes the AAR on the [GitHub release](https://github.com/improv-wifi/sdk-android/releases).

```groovy
dependencies {
implementation "org.openhomefoundation.improv-wifi:sdk-android:<latest version>"
}
```

## Usage
This library is for dealing with the complexities of the Bluetooth connection not creating any UI. You as the developer are responible for creating the UI/UX. A sample [Compose](https://developer.android.com/jetpack/compose) UI is provide in the demo application.
This library is for dealing with the complexities of the Bluetooth connection not creating any UI. You as the developer are responsible for creating the UI/UX. A sample [Compose](https://developer.android.com/jetpack/compose) UI is provided in the demo application.

- Review which [permissions are needed](https://developer.android.com/develop/connectivity/bluetooth/bt-permissions) for your app. By default, the library only adds the Bluetooth permissions to the manifest and no location permissions. You will want to add the location permission and/or declare that your app doesn't use Bluetooth to derive physical location.

- A simplified typical flow looks like:
```mermaid
flowchart TB
A("Check app permissions and Bluetooth status")-- OK --> B["`ImprovManager::findDevices`"]
B ---|onDeviceFound|C["ImprovManager::connectToDevice"]
B --> D["ImprovManager::stopScan"]
C ---|onConnectionStateChange true, onStateChange AUTHORIZED|E["ImprovManager::sendWifi"]
E ---|onStateChange PROVISIONED, onRpcResult has url|F("Redirect to device in browser")
```

[![Improv Wi-Fi - A project from the Open Home Foundation](https://www.openhomefoundation.org/badges/ohf-library.png)](https://www.openhomefoundation.org/)

0 comments on commit 2b7e2d8

Please sign in to comment.