Recent releases of the library are published on Maven Central, and each release of the library includes the AAR on the GitHub release.
dependencies {
implementation "org.openhomefoundation.improv-wifi:sdk-android:<latest version>"
}
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 UI is provided in the demo application.
-
Review which permissions are needed 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:
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")