-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README for recent changes (#9)
- Mention Maven publication - Mention modern Bluetooth permissions which should be checked and configured - Add a simplified typical flow - Add OHF badge
- Loading branch information
Showing
1 changed file
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/) |