This Android app provides quick access to essential emergency contacts. It displays a list of common emergency services (e.g., police, fire, hospital) with icons and names, and lets users call directly with a single tap.

تفاصيل العمل

Type of Work

This project is a native Android application built in Kotlin using Android Studio. It focuses on providing quick emergency contact access, combining a simple UI with system-level actions (dialing phone numbers).

Features

Emergency Contact List

Displays emergency services (police, fire, hospital, etc.) with icons and names.

One-Tap Calling

Tapping a card opens the phone dialer with the number pre-filled.

Custom Exit Dialog

An alert dialog confirms before closing the app.

Responsive UI

Edge-to-edge layout, RecyclerView for scrolling, and clean design.

Implementation Details

Data Model:

Emergency class holds each service’s image, name, and phone number.

RecyclerView & Adapter:

EmergencyAdapter inflates a custom item layout and binds data to each card.

onBindViewHolder sets the icon, name, and click listener to start an Intent.ACTION_DIAL using the service’s number.

MainActivity:

Creates a list of Emergency objects and connects it to the RecyclerView through the adapter.

Uses onBackPressedDispatcher to trigger an ExitDialog when the back button is pressed.

ExitDialog (DialogFragment):

Builds an AlertDialog with OK/Cancel buttons and exits the activity if confirmed.

UI & Resources:

Layouts defined in XML; strings and images are stored in resources for easy localization and maintenance.

ملفات مرفقة

بطاقة العمل

اسم المستقل
عدد الإعجابات
0
عدد المشاهدات
4
تاريخ الإضافة
تاريخ الإنجاز
المهارات