Setup
Get all of this in place before you call connect().
The permissions apply whichever way you issue. After that, follow the section for your route: brokered issuance (recommended) or Play Integrity.
Permissions
The SDK's own manifest declares the Wi-Fi permissions it needs, and they merge into your app automatically:
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
Both are install-time permissions, so there's no runtime prompt. You don't add them yourself; they'll just show up in your merged manifest.
Brokered issuance (recommended)
Your Broker vouches for each request, so you don't need Play Integrity, a Cloud project number, or an app identity registered with Wi-DAS. It also works on devices without Google Play Services.
- Set up your Broker. Brokered issuance covers what it does, the Microsoft Entra application it signs in with, and the calls it makes.
- Register it with Wi-DAS. Send us your Entra tenant ID and your Broker application's
Application (client) ID, and tell us which apps it should issue for. We register them and give
you your
clientId. Until then, every request is refused andconnect()throwsEntitlementMissing. - Give your app a way to reach your Broker. That's your own API, behind your own sign-in. You'll
wrap it in a small
Brokeradapter, shown in Usage.
One Broker can serve your iOS and Windows apps too. Tell us every app it should issue for.
Play Integrity
Use this section instead if you're issuing through Play Integrity rather than a Broker.
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.
Attestation runs on the Play Integrity API with self-managed response encryption, so Wi-DAS can decrypt and verify your app's integrity tokens on its side. Set it up in the Google Play Console for your app:
- Enable the Play Integrity API for the app.
- Link the app to a Google Cloud project and note its project number.
- Turn on self-managed response encryption and generate the response encryption keys, following Google's Play Integrity setup.
The two response encryption keys
Self-managed response encryption gives you two keys, and Wi-DAS needs both to read the integrity tokens your app produces. Google names them:
| Key | What it is | Purpose |
|---|---|---|
| Decryption key | A base64-encoded AES key | Decrypts the integrity token. |
| Verification key | A base64-encoded EC public key | Verifies the token's signature. |
Both are provided through the Play Console. Share them with Wi-DAS when you register (see
below). Without them, every request fails with
AttestationRejected even when the app itself is registered correctly.
The decryption key is a shared secret: send it to Wi-DAS through the channel your contact gives you, and keep it out of your app and its repository. The verification key is a public key. Neither ever ships in the app.
Cloud project number
Pass your Google Cloud project number when you configure. It's required for builds that aren't distributed through Google Play, such as the internal test builds you side-load while developing:
val widas = WiDAS.configure(
context = context,
clientId = "client-acme",
baseUrl = "https://partner-api.wi-das.com/",
cloudProjectNumber = 123456789L,
)
For Play-distributed builds it's optional, but passing it does no harm and keeps development and production behaving the same way.
The Play App Signing trap
This is the single most common reason production breaks. With Google Play App Signing, Play Integrity attests the certificate Google re-signs your app with, not the upload certificate you sign your build with locally.
Register the upload cert's SHA-256 and every Play-distributed build fails attestation with
AttestationRejected, even while a side-loaded debug build signed with the same key sails through.
Grab Google's app-signing certificate SHA-256:
- Play Console → your app → Test and release → Setup → App signing.
- Copy the SHA-256 certificate fingerprint under App signing key certificate (not the Upload key certificate).
- Send that SHA-256 and your package name to your Wi-DAS contact to register against your
clientId.
Register your app with Wi-DAS
Attestation is checked against your registered identity, and Wi-DAS decrypts your tokens with your
response encryption keys. Give your Wi-DAS contact all of the following to register against your
clientId:
- your package name,
- your app-signing certificate SHA-256 (from above), and
- your Play Integrity decryption key and verification key (the response encryption keys).
Until that's done, real devices get AttestationRejected / EntitlementMissing.
Checklist
Both routes:
-
minSdk≥ 30
Brokered issuance:
- Broker running, with its Entra application granted
Broker.Issue - Tenant ID and Broker application ID registered with Wi-DAS, and your
clientIdreceived - App-to-Broker connection protected with TLS, and the Broker's response relayed unaltered
Play Integrity:
- Play Integrity API enabled, with self-managed response encryption turned on
- Google Cloud project number passed as
cloudProjectNumber - Play Integrity decryption key and verification key shared with Wi-DAS
- App-signing cert SHA-256 (not upload cert) + package name registered against your
clientId - Testing on a device with Google Play Services
The Entitlements & permissions checklist pulls every platform together in one place.
Next: Usage.