Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README for recent changes #9

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/)