Android app built with Firebase and Google Maps to help users report COVID-19 status, view nearby affected users, and let health workers log in, mark patient counts, and browse a basic forum.
- Location-gated launch that prompts for GPS and location permission before entering the app.
- User flow: phone verification → profile capture (name, age, blood group, medical info) → home dashboard with quick links to maps, emergency contacts, prevention info, and donation links.
- Map view (
UserMapsActivity) showing nearby affected users via GeoFire + Google Maps with live marker updates. - Worker flow: email/password login → worker home with patient marking and access to the forum.
- Forum: simple Firebase Realtime Database feed listing submitted cases/treatment experiences; workers can post via
post_forum. - Background services:
locationupdate/Location_Servicesfor location tracking hooks (permissions required).
- Android SDK 29 (minSdk 24), Android Gradle Plugin 3.6.3
- Firebase Auth, Realtime Database, Analytics
- Google Play Services: Maps, Location
- GeoFire for geo queries
- AndroidX + legacy support libs (appcompat/constraintlayout)
- Root Gradle settings in
settings.gradle; app module atapp/. - Key activities under
app/src/main/java/com/example/kash/:MainActivity: splash, GPS/permission gate, routes tologin_global.login_global: entry selector for user vs worker.login_useranduser_verification: collect phone/profile data and persist to Firebase (Users,Unaffected).home: user dashboard with navigation to maps, emergency contacts, prevention info, donations.UserMapsActivity: Google Map + GeoFire markers for nearby affected users.login_workerandworker_home: worker auth and home; stops location service, opens forum/patient marking/settings.forum+forumdb: reads Realtime DBFORUMentries and renders them.- Other screens:
patient_num,mark_worker,post_forum,profile,settings,settings_worker,preventive_measure,emergency_contact,password_change, etc.
- Android Studio (3.6+ recommended) with Android SDK 29.
- A Firebase project with Realtime Database and Authentication enabled.
- A Google Maps API key (placed in
app/src/main/res/values/google_maps_api.xml).
- Clone the repo and open the root folder in Android Studio.
- Firebase config: place your
google-services.jsonunderapp/(file is already referenced in the repo path). - Maps API key: update
google_maps_api.xmlfor debug/release with your key. - Sync Gradle. If you see play-services/Firebase version clashes, align to a single BoM or bump the versions (the project mixes AndroidX and legacy support libs).
- From Android Studio: Run the
appconfiguration on a device/emulator with Google Play Services. - From CLI:
./gradlew clean assembleDebug- Install the APK from
app/build/outputs/apk/debug/onto a device with Google Play Services.
- Location:
ACCESS_FINE_LOCATION,ACCESS_BACKGROUND_LOCATION,FOREGROUND_SERVICEused by maps and tracking services. - Network:
ACCESS_NETWORK_STATEfor connectivity checks.
- User profile writes to Firebase paths
Users/{uid}andUnaffected/{uid}. - Worker login uses Firebase Auth email/password; email is cached in shared preferences (
ID). - GeoFire reads/writes from
Locationsto place markers for affected users. - Forum posts live under
FORUMin Realtime Database;forumdbis the model for entries.
- Location permission is mandatory; the app exits if GPS is disabled.
- The code mixes AndroidX and old support libraries; consider migrating fully to AndroidX to avoid conflicts.
- Ensure proper database rules and authentication in Firebase before deploying.