Testing
Use a demo publisher key to test your integration locally — it always returns an ad, so you can build against a predictable response.
Production keys reflect the real state of the network, so a request can legitimately return no ad — which makes local testing unreliable. A demo publisher key is wired to a guaranteed-fill test network, so every request returns a placeholder ad.
What a demo key gives you
- Verify your rendering and styling
- Exercise impression, view, and click tracking
- Screenshot your UI for review
- Run integration tests against a predictable response shape
Getting a demo key
Request a demo key from your Koah point of contact.
Demo keys are safe to commit to local development scripts, but never ship one to production — they don't generate revenue and they short-circuit real targeting.
Switching between keys
Connect this to your existing debug or release configuration so demo keys are used only in development.
val publisherId = if (BuildConfig.DEBUG)
"your-demo-publisher-id"
else
"your-production-publisher-id"
Koah(context) { this.publisherId = publisherId }
The no-fill warning
On a debug build, a production key that returns no-fill logs this once:
⚠️ Koah: production publisher key returned no-fill in a debug build.
Real-inventory fill rate is not 100%, so you may not see an ad —
this is expected behavior. For reliable local testing, use a
demo publisher key:
https://docs.koahlabs.com/demo-keys
This is expected — Koah only serves ads when they'll be valuable to your users, so some requests return no ad. Switching to a demo key for local development silences it automatically. There's no flag to turn it off; if you see it in production, you're likely shipping a debug build.