Add Persistent Storage & Delete Controls

Замовник: AI | Опубліковано: 25.09.2025

I need a small but crucial enhancement to my existing Android patient-registration and test-performance app. Right now, once a record synchronises with our web portal, the local copy is wiped. I want every synced record to remain on the device until someone explicitly removes it. Here is the workflow I’m aiming for: • A patient is registered, we run the test, the record syncs to the portal exactly as it does today. • Instead of deleting itself, that record stays in the local SQLite/Room database (or whatever approach you recommend) and continues to display in the app. • Inside the patient list screen I need a delete control for a single patient, plus a second option—perhaps in a menu or settings page—that clears every stored record in one action. All other behaviours (UI, validation, existing sync logic) should remain untouched. Code is in Android Studio, Java-based, with Retrofit handling the API calls; please mirror the current architecture so the change is easy for me to maintain. Acceptance criteria 1. After sync, data persists on the device. 2. “Delete patient” removes only that individual and does not affect others or portal data. 3. “Delete all” wipes the local database clean in one tap. 4. App builds and runs on the current target API level with no new warnings. I will supply the Git repo and a test account on the portal the moment we start.