Courses / Mobile Application Development (CDE-315) – BS CS 5th Semester
Assignment 3 (Weeks 10–13) – Course Notes and Announcements: Data, REST API and Messaging
Week 13 – Web Services: Accessing and Creating · 600 min read
Assignment 3 – "Course Notes & Announcements" Data-Driven App
Covers: Weeks 10–13 (UI events, views and lists, preferences, persisting and sharing data, SMS/email, maps, web services – consuming and creating; Labs 10–13) CLOs: CLO-2 (develop apps), CLO-4 (modern tools for complex problems) Type: Individual · Marks: 20 · Suggested due: end of Week 13
Part A – Build a small REST API (5 marks)
Create a web service for announcements using Node.js + Express (or PHP + MySQL, or Python Flask/FastAPI):
| Endpoint | Behaviour |
|---|---|
GET /api/announcements |
List all (id, title, body, date, location lat/lng optional) – 200 |
GET /api/announcements/:id |
One announcement – 200 or 404 |
POST /api/announcements |
Create; validate title and body – 201 or 400 |
DELETE /api/announcements/:id |
Delete – 204 |
Test every endpoint in Postman (screenshots). Run it locally (emulator uses http://10.0.2.2:PORT/) or deploy free (e.g. Render/Railway) with HTTPS. |
|
(If you cannot run a server, use https://jsonplaceholder.typicode.com/posts for Part B and write the server code anyway for marking.) |
Part B – Android client (12 marks)
- Announcements screen – fetch the list with Retrofit + coroutines, show it in a RecyclerView of cards; show a ProgressBar, an error message with Retry, and an "empty" message.
- Detail screen – tap a card to open details; buttons to share (
ACTION_SEND), email the CR (mailto:with subject prefilled), SMS the class (smsto:with body prefilled), and show location on map (geo:intent) when coordinates exist. - Post announcement (for CRs) – a form that sends
POSTto your API and shows the result (201 → success Snackbar; 400 → field error). - Notes – a personal notes screen that saves notes offline (Room database or a JSON file in internal storage) and lists them; long-press to delete with an UNDO Snackbar.
- Settings – remember the student's name and a dark-mode switch with SharedPreferences; apply dark mode at start.
- UI events – use at least four different listeners (click, long click, text change for a live search filter, checked change).
Part C – Short report (3 marks)
- Compare SharedPreferences, internal files, SQLite/Room and a content provider; state where you used each and why. (1.5)
- Explain SOAP vs REST and justify REST for your app; list the HTTP methods and status codes your API returns. (1.5)
Deliverables
Server code + Postman screenshots, Android project + APK, short demo video, report PDF.
Rubric
| Criterion | Marks |
|---|---|
| REST API correct methods, validation and status codes | 5 |
| Retrofit list with loading/error/empty states | 3 |
| Detail screen intents (share, email, SMS, map) | 2 |
| POST from the app with feedback | 2 |
| Offline notes (Room/file) with delete + undo | 3 |
| SharedPreferences settings and listeners | 2 |
| Report | 3 |
Previous: Week 13 Lab 13 – Build a Countdown Timer App · Next: Supabase Week Theory – Cloud Data Tier for Android: Supabase, SQL, Row Level Security, Auth and REST
All lessons in Mobile Application Development (CDE-315) – BS CS 5th Semester