Android SDK overview
The Wi-DAS Android SDK is a native Kotlin library (AAR) that adds Wi-DAS Passpoint onboarding to
your app. A small WiDAS facade gets a signed client certificate and installs a Passpoint profile.
You call four verbs; everything else is internal.
Two ways to issue
Before Wi-DAS signs a certificate, something has to vouch for the request. You pick which when you configure the SDK:
- Through your Broker (recommended). Your own backend service vouches for the user you've signed in. The SDK hands its signing request to your Broker, and your Broker gets the certificate. It's the same route the iOS and Windows SDKs use. See Brokered issuance for what running a Broker involves.
- Through Play Integrity. Google's Play Integrity API proves the request came from your genuine app, and the SDK talks to Wi-DAS directly. There's no backend to run, but it only tells Wi-DAS which app is asking, not who the user is, and it needs Google Play Services on the device.
Everything else is the same on both routes: the device key, the signing request, the Passpoint install and the four verbs.
We'll remove Play Integrity support from the SDK in the near future, leaving brokered issuance as the only route. Build new integrations on a Broker, and if your app uses Play Integrity today, plan to move it across.
At a glance
| Distribution | Maven Central (com.wi-das.sdk:widas) |
| Minimum OS | Android 11 (API 30) |
| Language | Kotlin (coroutines / suspend) |
| Issuance | Through your Broker (recommended), or Play Integrity (being retired) |
| Passpoint install | WifiManager |
| Telemetry | None |
| Version | 0.5.x |
The public surface
import com.widas.sdk.WiDAS
// Configure once. Your Broker adapter relays the signing request to your Broker.
val widas = WiDAS.configure(
context = context,
clientId = "client-acme",
broker = MyBroker(http, brokerEndpoint, signIn::accessToken),
baseUrl = "https://partner-api.wi-das.com/",
)
// Advisory status — degrades to local state rather than failing. Check it before connecting.
val status = widas.status() // NONE | VALID | EXPIRED | REVOKED | UNKNOWN
// Onboard the user. Each call issues a new certificate, so only when there's no usable one.
// suspend, so call from a coroutine.
when (status.state) {
WiDAS.Status.State.NONE,
WiDAS.Status.State.EXPIRED,
WiDAS.Status.State.REVOKED -> widas.connect(user = "user-42", requestedValidity = "P365D")
else -> Unit // VALID, or UNKNOWN: don't re-issue
}
// Remove the installed profile.
widas.disconnect()
To use Play Integrity instead, pass cloudProjectNumber in place of broker. The rest of the code
doesn't change.
connect(), status(), and disconnect() are suspend functions, so call them from a
coroutine.
The four verbs
| Verb | What it does |
|---|---|
WiDAS.configure(context, clientId, broker, baseUrl) | Configures the SDK for brokered issuance. Ships no secret; clientId is public. |
WiDAS.configure(context, clientId, baseUrl, cloudProjectNumber?) | Configures the SDK for Play Integrity instead. |
connect(user, requestedValidity?) | Onboards the user, issuing a new certificate. Call it when status() reports NONE, EXPIRED or REVOKED, not on every launch. |
status() | Advisory certificate status. Degrades to local state on any lookup failure. |
disconnect() | Removes the installed Passpoint profile. |
Next steps
- Installation — add the library.
- Setup — permissions, and getting registered for your chosen route (including the Play App Signing trap if you use Play Integrity).
- Usage — implementing your Broker adapter and wiring the four verbs into your app.
- Error handling — the
WiDASExceptiontypes and what to do about each.