Smart Air Quality Prediction and Alert System for Android

5 min read
Mobile Application Development

Abstract / Introduction:

Air pollution is a growing public health concern, making timely monitoring and prediction essential. This project "Smart Air Quality Prediction and Alert System for Android" introduces a machine learning–based mobile application that forecasts Air Quality Index (AQI) using historical AQI data and weather parameters like temperature, humidity, and wind speed.

The system applies predictive models to generate AQI forecasts and classifies them into health-based categories (Good, Moderate, Unhealthy, etc.). When poor air quality is detected, the app sends real-time alerts, helping users take preventive measures such as limiting outdoor activities or using protective masks.

Functional Requirements:

User Management:

  • Support two types of users: Admin and Citizen.
  • Provide registration and login pages for users.
  • Store credentials securely using Firebase Authentication.

Admin Dashboard:

  • Manage historical AQI datasets.
  • Configure default AQI thresholds.
  • Update health recommendations for each AQI level.
  • Monitor user activity, manual data submissions, and alerts sent.

Data Input (Automatic & Manual):

  • Automatic Input: Fetch real-time weather data (temperature, humidity, wind speed) and AQI data using public APIs, and refresh it automatically at regular intervals (e.g., every 60 minutes).
  • Manual Input: Citizens can manually input local data to get instant AQI predictions (even offline). Data should sync with Firebase database when internet is available.

AQI Prediction:

  • Preprocess input data and pass it to the trained AI model.
  • Predict AQI value and classify it into AQI categories (Good, Moderate, Unhealthy, etc.).
  • Display results within seconds along with its category, colour code and health recommendations.

AQI Classification Levels:

The app should classify AQI into the following categories:

  • 0-50 Good (Green): No health risk. Safe to enjoy outdoor activities.
  • 51-100 Moderate (Yellow): Minor risk for sensitive groups. Sensitive people should reduce long outdoor stays.
  • 101-150 Unhealthy for Sensitive Groups (Orange): Some risk for sensitive groups. Limit outdoor activity if you're in a sensitive group.
  • 151-200 Unhealthy (Red): Health effects possible for all. Avoid outdoor exercise; stay indoors if possible.
  • 201-300 Very Unhealthy (Purple): Serious health risks for everyone. Stay indoors; use air purifiers if available.
  • 301+ Hazardous (Maroon): Emergency: high risk for all. Avoid all outdoor activities; follow government alerts.

Alerts and Notifications:

  • Citizens should receive push notifications when AQI crosses unsafe thresholds.
  • Alerts should include recommended actions (e.g., "Avoid outdoor activities").
  • Admin can configure default AQI alert thresholds.

History and Trends:

  • Store AQI history (daily, weekly, monthly) and visualize trends in graphical form.
  • Sync history with Firebase database for cloud backup.

Offline Functionality:

  • Citizens should be able to view last fetched AQI and input data manually when offline.
  • Data should automatically sync when the device reconnects to the internet.

Help and Support:

  • Provide FAQs, health guides, and tutorials to help users understand AQI and its impact.
  • Include a feedback option for reporting issues.

Workflow:

The basic workflow includes: Project Setup (Install Android Studio & PyCharm, Configure Firebase), Dataset Preparation (Collect and preprocess historical AQI and weather datasets), AI Model Development (Train ML model, convert to TensorFlow Lite), Android App Implementation (Create app, integrate AI model).

Note: This is an Android-only development project, so tools like Flutter or Dart for cross-platform development are NOT allowed. VU will NOT pay for any software/library/toolkit/API used in this project.

    Tools & Technologies
  • Android Studio, PyCharm, Java/Kotlin, Python, Firebase Real
  • Time/Cloud Fire
  • Store, SQLite/Room, Kaggle AQI Dataset, Random Forest/XGBoost, LiteRT i.e., TensorFlow Lite, OpenWeatherMap API/AQICN API/OpenAQ API

Share this project:

Faisal Mehmood

Faisal Mehmood Expert in CS619 Final Year Projects and software development.

View all projects