Healthcare utility apps are consistently among the most popular and highly retained apps on Google Play. The Medicine Reminder App is a full-featured, production-ready Android Studio project designed to help patients manage prescription schedules, track daily dosages, and receive recurring audio-visual alerts even when the device is locked or in Doze mode.

This guide provides an architectural overview of how this application is structured, how to open and build it in Android Studio, and how to customize the database, notifications, and UI for commercial release.

Medicine Reminder Full Project Source Code

Clean MVVM Architecture • Room SQLite • AlarmManager • Price: Rs 1500

🛒 Get Project Source Code

1. Architecture Overview (MVVM & Clean Architecture)

The project follows Google's recommended Modern Android Development (MAD) architecture principles:

2. Project Directory Structure

app/src/main/ ├── java/com/aixhub/medicinereminder/ │ ├── data/ │ │ ├── MedicineDao.java // Room DAO for CRUD queries │ │ ├── MedicineDatabase.java // Room Database instance │ │ └── MedicineEntity.java // Table schema model │ ├── receiver/ │ │ ├── AlarmReceiver.java // BroadcastReceiver for wakeups │ │ └── BootReceiver.java // Reschedules alarms on device reboot │ ├── service/ │ │ └── NotificationService.java // Fullscreen high-priority alert │ ├── ui/ │ │ ├── MainActivity.java // Dashboard list of active medicines │ │ ├── AddMedicineActivity.java // Form to set times, dosage & pills │ │ └── MedicineAdapter.java // RecyclerView adapter with swipe-to-delete └── res/ ├── layout/ // Material 3 XML layouts └── values/ // Dark and light theme colors

3. Reliable Scheduling with AlarmManager

Android 12+ (API 31+) and Android 14+ require specific permissions to schedule exact alarms (SCHEDULE_EXACT_ALARM). In this project, the scheduling logic checks permissions and handles fallback gracefully:

AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); Intent intent = new Intent(context, AlarmReceiver.class); intent.putExtra("MEDICINE_ID", medicine.getId()); intent.putExtra("MEDICINE_NAME", medicine.getName()); PendingIntent pendingIntent = PendingIntent.getBroadcast( context, medicine.getId(), intent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE ); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { alarmManager.setExactAndAllowWhileIdle( AlarmManager.RTC_WAKEUP, medicine.getTriggerTimestamp(), pendingIntent ); }

4. Surviving Device Reboots (BootReceiver)

When an Android device restarts, all scheduled AlarmManager timers are cleared from memory. This project implements a dedicated BootReceiver that listens for the BOOT_COMPLETED broadcast intent and automatically re-registers all active reminders from the local Room database:

public class BootReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) { // Fetch active medicines from Room in background thread Executors.newSingleThreadExecutor().execute(() -> { List<MedicineEntity> list = MedicineDatabase.getInstance(context).medicineDao().getAllActive(); for (MedicineEntity med : list) { AlarmScheduler.scheduleAlarm(context, med); } }); } } }

5. Customization & Rebranding Guide

  1. Change Application ID: In app/build.gradle.kts, update applicationId "com.yourname.medicinereminder".
  2. Update Colors & Theming: Edit colors.xml and themes.xml to match your preferred healthcare branding.
  3. AdMob Integration: Pre-configured layout slots for AdMob Banner and Interstitial ads are already commented in MainActivity.java. Simply add your AdMob App ID.

Conclusion

The Medicine Reminder source code provides everything required to publish a reliable, high-retention health utility to Google Play. Download the complete project archive on AIX Hub Store today!