Inspiration

When a flood or an earthquake hits, mobile networks are often the first thing to fail. That is exactly when people need clear steps and a way to ask for help. Most emergency apps need a connection, and AI chatbots can sound confident and be wrong. We wanted an app that still gives checked guidance with no signal.

What it does

Lantern is an Android app for floods and earthquakes, with a dashboard for responders.

  • Ask: type a question in English, Urdu or Roman Urdu. Lantern finds the matching Safety Card and shows its text unchanged, with its source. The model picks the card. It does not write the advice.
  • Report: send what is happening (type, needs, people, place). If there is no signal, the report is saved on the phone and sent when signal returns.
  • Lantern Desk: a responder dashboard with Google sign-in for allowed responders, live reports sorted by urgency, a map, alerts and a light and dark theme.

How we used Firebase AI Logic

Firebase AI Logic is how the app calls Gemini. The routing is: Gemini Nano on the device first, then cloud Gemini through Firebase AI Logic, then an offline keyword match on the phone, and finally a clear "no match" message with the emergency numbers. Only the question text goes to the cloud. Never a name, a phone number or an exact location.

We also use App Check, Remote Config (to update cards and settings without a new build), Firestore, Firebase Authentication and Analytics.

Cloud Gemini through Firebase AI Logic is tested on a real phone. On-device Gemini Nano runs only on supported phones, and we could not test it on one in time, so we do not claim a Nano result.

Why the model never writes the advice

In an emergency, one wrong sentence can hurt someone. So every answer comes from a Safety Card. We built 6 cards (3 flood, 3 earthquake). Every step on every card links to a public source (PDMA Khyber Pakhtunkhwa, NIH Pakistan, CDC), and the supporting sentence for each step is in our verification log in the repo. The model only chooses which card fits.

Rules that never change: no medical doses, no diagnoses, a report leaves the phone only when the user taps send, and every answer starts with "Call your local emergency number first if you can."

Challenges

  • Gemini Nano is validated on-device for English and Korean only. Urdu and Roman Urdu quality is unknown, so we kept the model's job small: choose a card.
  • Gemini Nano runs only on supported phones, and none of our team phones are on the list.
  • Emergency numbers differ by region. We list only the ones we saw on official pages (Punjab 1122, Khyber Pakhtunkhwa PDMA 1700), each with its region.

Accomplishments we are proud of

  • A working Android app with Ask and Report, including offline queueing.
  • Six Safety Cards with every step traced to a public source.
  • A responder dashboard, Lantern Desk, connected to live Firebase data (Google sign-in, live reports and alerts).
  • A routing order that still gives an answer when there is no signal and no Nano.

What we learned

Keep the model's job narrow and let verified text do the talking.

Honest limits

  • The Safety Cards were checked by one person. The Urdu and Roman Urdu text is our own translation of the English sources.
  • The flood sources are from Khyber Pakhtunkhwa, so we do not claim they cover every province.
  • Emergency numbers are verified for Punjab and Khyber Pakhtunkhwa only.
  • Alerts are in-app banners from live listeners, not push notifications.

What's next

Cards for shelter and missing family, emergency numbers for every province, a native Urdu review and a second card checker, testing on supported phones, and push notifications for alerts.

Built With

Share this project:

Updates

Submission history