Inspiration

My biggest drive for building AquaSentry was seeing a critical flaw in real-world disaster tech. Living here in Mumbai (Vikhroli), I know that floods come from heavy monsoon rain and blocked drains, not just major rivers. Yet, every generic flood app relies on river data, giving us a dangerous "false safe" reading when the urban risk is actually critical. I realized I needed to build a system that respected local reality and provided truly reliable data.

What it does

AquaSentry is a specialized, stable Android application that fuses multiple data sources to give a reliable flood risk score and immediate access to critical services. It is designed to be the single source of truth when seconds count.

How we built it

I built AquaSentry natively on Android using Java. The architecture is designed for stability and accuracy:

  1. Geolocation: I used the Google Fused Location Provider for high-accuracy coordinates.
  2. Dual Fetch: This triggers two separate, simultaneous API calls, one for River Discharge and one for Rainfall Sum.
  3. Risk Fusion: The app processes both data streams locally and highlights the highest risk factor (River or Rain) to set the final flood level animation.

Challenges we ran into

The project became a masterclass in defensive coding. My biggest hurdles were:

  1. API Data Volatility: The Open-Meteo APIs, particularly the GloFAS river data, frequently returned null or structurally inconsistent JSON for non-river areas. This caused countless NullPointerException and application crashes early on.
  2. IDE and Threadying: Getting the concurrent network thread (ExecutorService) to cleanly update the UI (Handler.post) without causing a hang or crash was tricky, especially when dealing with the high volume of files and external dependencies.
  3. UX Flow Bug: A frustrating bug in the permissions activity forced users to tap the "Continue" button a second time after granting notification access.

Accomplishments that we're proud of

I’m most proud of achieving rock-solid reliability where general solutions fail:

  1. Stability Triumph: I eliminated all critical crashes by implementing robust try-catch structures and null checks across all parsing logic. The app now survives bad data gracefully.
  2. Accurate Prediction: The dual-API fusion successfully solves the "false safe" problem. The app can now accurately raise the flood diagram based on forecasted heavy rainfall, making it uniquely useful for coastal megacities.
  3. Seamless Onboarding: The permission bug was resolved, allowing the app to automatically proceed to the Dashboard immediately after the user grants the final required permission.

What we learned

I learned the immense difference between code that "works" and code that is truly resilient. I developed a strong appreciation for defensive programming and how crucial clean exception handling is for public safety applications. This project significantly deepened my understanding of native Android concurrency models.

What's next for AquaSentry

  1. Multi-Language Access: Implementing localization to ensure critical alerts are delivered in multiple languages, making the app truly accessible to all global communities.
  2. Community Intelligence: Building a feature that allows users to submit geo-tagged photos and reports of ground-level flooding, instantly crowdsourcing crucial real-world data to validate and improve the AI models.

Built With

  • androidx-libraries
  • git
  • google-fused-location-provider
  • native-android-(java)
  • open-meteo-flood-api-(glofas)
  • open-meteo-weather-api
Share this project:

Updates