Inspiration
A good conversation often starts with a small question, not a blank chat box. Pairwhisper gives two adults a simple ritual: pick a mood, draw a card and talk. It does not score relationships, predict compatibility or give relationship advice.
The privacy choice matters as much as the questions. A generic card can be made in the cloud without knowing anything personal. A follow-up about someone's own answer should stay on their phone. That distinction shaped the Android app.
What it does
Pairwhisper combines a bundled offline deck with fresh AI-generated conversation cards and six-card themed packs. People can choose a theme, save a favorite card and optionally type a short answer to ask for one gentle follow-up.
Every generated card shows the inference source reported by the Firebase SDK. The app does not guess whether generation happened locally from the phone's network state. A curated follow-up is labeled as curated rather than passed off as an AI result.
How we built it
The native Android app uses Kotlin and Jetpack Compose. Firebase AI Logic provides three distinct generation routes:
- Generic cards: PREFER_ON_DEVICE. The model prefers local inference, with an explicit cloud model available when local inference cannot run. The prompt accepts only fixed theme and tone IDs, not personal answers or conversation history.
- Private follow-ups: ONLY_ON_DEVICE. The optional answer is transient input to the local-only route. There is no cloud retry. If local generation is unavailable, fails or times out, the app returns a bundled neutral follow-up instead.
- Themed packs: ONLY_IN_CLOUD. The app requests six cards through structured generation, then validates the result before showing the pack. Input is a fixed theme ID and a requested pack size.
Generated schemas and domain validation check the output before it reaches the deck. Transient cloud failures receive capped retries; quota, safety, App Check and invalid-output failures are not treated as reasons to retry indefinitely.
Firebase App Check protects development cloud access. The recorded emulator session used a temporary debug token, revoked after the recording. Production Play Integrity integration is future work, not a completed release feature.
The bundled deck works without AI. Private answers are not saved as favorites or written to application storage, and Android backup is disabled for the app.
What the demo proves
The short video uses the real Android app running in an emulator, edited for time, with AI-generated narration. It shows:
- A generic card whose SDK-reported inference source is cloud.
- A six-card themed cloud pack.
- A private follow-up falling back to a curated question when local generation is unavailable.
Limitation: successful Gemini Nano inference has not been verified on a supported physical phone. The app includes the local-only route, but this submission must not claim that the emulator video proves successful on-device generation.
Challenges
The hardest design problem was making fallback behavior understandable without weakening the private-answer boundary. The generic-card route may use the cloud; the private-follow-up route may not. A curated question is a better failure mode than silently sending private text elsewhere.
Structured output also needs product-level checks. A response can match a schema and still be an unsuitable card, so the app applies domain validation after schema-based generation. A malformed pack is rejected rather than partly shown.
Testing cloud behavior on the free tier required handling transient high-demand failures. A real emulator session was used to verify the cloud source chip and record the final demo, instead of substituting a mock UI.
What we're proud of
Hybrid inference is visible in the product rather than hidden in an implementation detail. People can see where a card was generated, and the private route has a different, stricter fallback promise than the generic route.
The app also remains useful when generation is unavailable: the bundled deck and curated follow-ups keep the conversation going.
What we learned
A privacy boundary is easier to explain when it is also a code boundary. Keeping private-answer generation separate from cloud-capable generation makes that promise easier to test and review.
What's next
- Verify Gemini Nano generation on supported physical hardware.
- Finish and verify the user-started on-device model-download flow.
- Add Play Integrity App Check for release builds.
- Expand the bundled deck and themed packs without sending personal answers to the cloud.
Existing project disclosure
Pairwhisper's brand predates this entry. The native Android app and hybrid-inference implementation were built for the hackathon. Gemini Nano support is implemented but physical-device inference remains unverified.
Built With
- firebase
- jetpack
- kotlin