Courses / Mobile Application Development (CDE-315) – BS CS 5th Semester
Project Step 9 – Polish and Test: Errors, Rotation, Dark Mode, Accessibility, Battery and Test Cases
Course Project (Java) – Build a Modern Cloud App Step by Step (CampusPulse + 7 ideas) · 60 min read · 3 MCQs to check yourself
Goal
Turn a working app into a polished one: handle errors and edge cases, check rotation and dark mode, think about battery and data (week 17 theory), and fill in your test-case table. Optional level-up ideas earn bonus marks.
9.1 Polish checklist
| Area | What to check | How |
|---|---|---|
| Empty states | No events → friendly message | tvEmpty in Home (already there) |
| Errors | No internet → Snackbar with Retry, no crash | Turn on airplane mode and use every screen |
| Loading | Spinners/disabled buttons while waiting | Progress indicators in sign-in, Publish disabled while saving |
| Validation | Every form field has a clear error message | Try empty, short and wrong inputs |
| Rotation | Forms keep their data; countdown keeps running | Rotate on every screen |
| Dark mode | Text readable, no white flashes | Switch dark mode in Profile |
| Accessibility | contentDescription on images; touch targets ≥ 48dp; text scales |
Settings → Display → Font size = largest |
| Battery & data | Timers stop when the screen is hidden (onStop/onDestroyView); location read once, not continuously; list loads only on open/refresh |
Review the code |
| Security | Only the publishable key in the app; RLS on all tables; local.properties not in Git |
Check .gitignore |
9.2 Test-case table (fill in and submit)
| # | Feature (lab) | Steps | Expected | Pass? |
|---|---|---|---|---|
| 1 | Splash + theme (1, 3) | Launch app | Splash with logo, then sign-in | |
| 2 | Registration (7) | Leave name empty → Create | "Enter your full name" | |
| 3 | Sign-in (4, 10) | Valid account | Main screen; email remembered after sign-out | |
| 4 | Bottom nav (5) | Tap each tab | Correct screen and title | |
| 5 | Menu (8) | Each menu item | Action + message | |
| 6 | List (12) | Open Home | Events from Supabase, newest data | |
| 7 | Filter chips | Tap Sports | Only sports events | |
| 8 | Countdown (13) | Open an event | Ticking countdown | |
| 9 | Map (14) | Map button | Maps app at the venue | |
| 10 | Dialer / browser (6) | Call / Website | Dialer with number / browser | |
| 11 | SMS / email (11) | Share by SMS / Email organiser | Apps open with text filled | |
| 12 | Location (15) | Use my location | Coordinates shown | |
| 13 | Notification (6) | Publish an event | "Event published" notification | |
| 14 | RLS | Second user opens your event | No Delete button; a DELETE request through the API removes nothing | |
| 15 | Feedback (17) | Submit → wait 10 s | Saved; Email a copy works; Cancel stops it | |
| 16 | About (2) | Profile → About | HTML page in WebView, follows dark mode | |
| 17 | Offline | Airplane mode → Refresh | "No internet connection" + Retry | |
| 18 | APK (16) | Install on a phone | App runs outside Android Studio |
9.3 Level-up ideas (bonus, pick any)
| Idea | Hint |
|---|---|
| Search | Add a SearchView in the toolbar; keep events where e.title.toLowerCase().contains(query.toLowerCase()) |
| Go live | Supabase Realtime: listen to events changes over a WebSocket (OkHttp has newWebSocket) and reload the list |
| Event posters | Supabase Storage bucket posters; upload with POST /storage/v1/object/posters/<file>; save the URL in an image_url column; show it with Glide |
| Reminders | Schedule a notification 1 hour before an event with WorkManager |
| Edit an event | PATCH /rest/v1/events?id=eq.<id> (the update policy is already there) |
| "I'm going" button | Table attendees(event_id, user_id) with RLS; show the count |
| AI summary | A Supabase Edge Function that calls an AI API to summarise a long description (keep API keys in the function, never in the app) |
| Home-screen widget | An AppWidgetProvider that shows the next event and its date |
Short and long questions
1. Project viva: List four checks you did to polish the app.
Model answer
Offline handling with a Retry Snackbar; validation messages on every form field; rotation keeps form data and countdowns; dark mode readability; contentDescription and large-font accessibility; timers stopped when screens are hidden; only the publishable key in the app and RLS on all tables.
2. Write a test-case table of at least eight cases for your app covering labs, Supabase and RLS, and describe how you tested on a real device.
Model answer
Table with columns #, feature, steps, expected, result: splash/theme, registration validation, sign-in and remembered email, bottom navigation, menu items, list from Supabase, category filter, countdown, map intent, dialer/browser, SMS/email, current location, notification, RLS second user, feedback undo window, About WebView, offline Retry, APK install. Device testing: install the signed APK, real GPS outdoors, real SMS/email apps, notification permission on Android 13+, dark mode and rotation, airplane mode.
This lesson ends with a quiz of 3 MCQs. Open the lesson on PrepOasis to take it and save your progress.
Previous: Project Step 8 – Connect the App to Supabase with Retrofit (Lab 12 + Supabase Week) · Next: Project Step 10 – Release APK, Demo Video and Submission (Lab 16)
All lessons in Mobile Application Development (CDE-315) – BS CS 5th Semester