Inspiration

Every day people share photos and screenshots of passports, ID cards, invoices, bank statements and health cards in family groups, with landlords, recruiters and agents. In India alone that means Aadhaar and PAN cards, voter slips and ABHA health cards. Those pictures and documents carry far more than the sender means to share: an ID number, a home address, a date of birth, a phone number, a face. Sending them to a cloud AI to be "cleaned" would defeat the point, so the AI that looks at the original has to run on the phone.

What it does

ShareLess takes a screenshot, photo, PDF or pasted text and:

  1. Reads it on the phone (OCR, face and QR detection) and finds sensitive details with 25 rule-based detectors: passport MRZ with ICAO check digits, payment cards with Luhn, IBAN with mod-97, Aadhaar with Verhoeff, PAN, voter ID, ABHA, UPI, bank accounts, phone, email, address blocks, API keys, JWTs and more.
  2. Asks Gemini Nano, on the phone, to find what rules can't: names and context-dependent details. The original document never leaves the device.
  3. Shows what it found, lets you untick or add anything, and burns black bars into the pixels. PDFs are rebuilt as images with no text layer or metadata, so nothing can be copied out from under the bars. The result is read again to make sure nothing slipped through.
  4. Optionally summarises or answers questions about the blacked-out version. Only if you approve the exact text does it go to Gemini in the cloud.
  5. Works from the share sheet (new in 1.1.0). In WhatsApp, Gallery or Files, tap Share → ShareLess on a screenshot, photo, PDF or text. It opens for review, you black it out and send it on, without saving a copy first. The shared file is read in memory on the phone, never uploaded.

Try it: ShareLess is live on Google Play: https://play.google.com/store/apps/details?id=app.shareless (a browser version is at https://share-less.web.app).

How we used Firebase AI Logic hybrid inference

All inference goes through Firebase AI Logic. ShareLess chooses the inference mode per feature, based on what the model is allowed to see:

  • Detection on the original document: ONLY_ON_DEVICE. The hybrid SDK runs Gemini Nano on the phone (firebase-ai + firebase-ai-ondevice on Android; the Firebase JS SDK on Chrome). It works offline. The app checks the model status at start and downloads Gemini Nano in the background through the SDK's on-device extension, preferring Gemini Nano 4 when the phone has it.
  • Summary and Q&A on blacked-out text you approved: PREFER_IN_CLOUD. Gemini 3.5 Flash-Lite answers in the cloud; if the phone is offline, the same request falls back to Gemini Nano. The response's inferenceSource tells the app where it really ran, and the UI shows that.
  • Without consent, everything stays ONLY_ON_DEVICE.
  • Firebase App Check protects every cloud request (limited-use tokens).

Consent is bound to the exact approved text by a SHA-256 digest and re-checked at the network boundary, together with a residual scan of the sanitized text, so a code change elsewhere can't quietly send original content to the cloud.

The demo video's app scenes are real screen recordings on an Android phone: Gemini Nano on the device, an offline scan in airplane mode, the consent screen, an answer from Gemini in the cloud, and the same feature answered by Gemini Nano offline.

How we built it

Flutter (Android, web, iOS) with three pure-Dart packages: detection_engine (rules, checksums, OCR row reconstruction, risk score), privacy_guard (consent digests and routing policy) and document_engine (pixel burning, EXIF stripping, image-only PDF rebuild). Native Kotlin bridges Flutter to the Firebase AI Logic hybrid SDK, because the Flutter firebase_ai package doesn't expose on-device inference yet. 141 automated tests, all with synthetic data.

Challenges we ran into

  • OCR quirks: a Latin-only OCR engine reads the regional-script half of two-language ID cards as noise, tables come back as separate label and value columns, and Android's OCR can split an email at the "@". We rebuild rows from word positions so "Name" meets its value, join words that touch at an "@", and cover the regional-script copy of a name next to the English one.
  • Keeping the hybrid story honest: the convenient PREFER_ON_DEVICE default would have let unconsented text reach the cloud when Nano is missing, so each feature uses the strictest mode its data allows.

What we learned

Hybrid inference is most useful when the mode is a privacy decision, not just a latency one. Picking ONLY_ON_DEVICE vs PREFER_IN_CLOUD per feature, and showing the user where each answer actually ran, made the privacy promise something the app can prove rather than just claim.

What's next

ShareLess for iOS. The Flutter app already builds for iOS; next is the same hybrid privacy model there: Firebase AI Logic hybrid inference with Apple Foundation Models on the iPhone for the original document, the cloud only for blacked-out text the user approved, and an iOS share extension so a screenshot can be blacked out straight from Photos, WhatsApp or Files. Then the App Store release and more document types.

Built during the submission period

All code was written between 25 and 30 November 2026. There is no pre-existing code. Source code is Apache 2.0.

Built With

Share this project:

Updates

Submission history