CSCI 448 - Mobile Application Development

Spring 2023 - Assignment 3 - Android Movie Database

This assignment is due by Tuesday, April 18, 2023 by 11:59pm.

For this assignment, you will follow the same process as Samodelkin to create a new app.

When you create this project, set the package to include <userName_A3> and name the app <userName>_A3 where userName is your name (for instance, mine would be jpaone_A3).

An example of the completed app is shown below:





Part I - The Remote Data


We will use Rapid API to access the IMDB API. Create a Rapid API account and then subscribe to the Basic free level.

There will be two endpoints we connect to:

  1. GET auto-complete
  2. GET title/get-videos

When looking at the documentation for the two endpoints, the Kotlin (OkHttp) code snippet will be helpful in setting up the Retrofit request. The Example Responses will show the format that the JSON response comes in as.

Create the Kotlin classes that will mirror the structure of the JSON response. Have these classes persist to a Room database as well.

Create the appropriate Retrofit fetchr class and REST interface. Some implementation notes/recommendations:


Part II - UI/UX


We'll need to make several screens for our app:

  1. The Movie List screen - displays a list of all the movies saved to the database
  2. The Search For Movie screen - search IMDB to find new movies to add to the database
  3. The Movie Detail screen - displays the details of a single movie and allows to search IMDB for video clips connected to the movie

You have freedom with how the screens exactly look, but they must meet the following requirements:

Movie List Screen

movie list screen

Some implementation notes/recommendations:

Movie Detail Screen

movie detail screen

Some implementation notes/recommendations:

Search for Movie Screen

movie search screen

Some implementation notes/recommendations:


Part III - Navigation


We will make use of the top bar for this app.

When on the movie list screen, there will be a top bar menu item that goes to the search for movie screen. After saving a new movie, the user returns to the movie list screen and will see the movie listed. Pressing back at this point does not return to the search screen. Be sure a new destination is not added to the back stack.

Clicking on an individual movie will navigate to the movie detail screen. There will be a top bar menu item that deletes the selected movie from the database. After searching for videos, when pressing the play video button a new app should be launched (likely a web browser) to view the video in a webpage.


Part IV - ViewModel


Nowhere above is the ViewModel explicitly listed. You'll need to make sure it sits seamlessly between your Model and View to update both as appropriate based on data loads and user actions.


Part XC - Extra Credit


There are several opportunities for extra credit:

See the posted video above for expected example functionality.


Documentation


With this and all future assignments, you are expected to appropriately document your code. This includes writing comments in your source code - remember that your comments should explain what a piece of code is supposed to do and why; don't just re-write what the code says in plain English. Comments serve the dual purpose of explaining your code to someone unfamiliar with it and assisting in debugging. If you know what a piece of code is supposed to be doing, you can figure out where it's going awry more easily.

Proper documentation also means including a README.txt file with your submission. In your submission folder, always include a file called README.txt that lists:


Grading Rubric


Your submission will be graded according to the following rubric.

Will follow

Percentage Requirement Description
20%

Model:

  • Movies stored as entities in a Room database with the respective fields.
20%

View:

  • Movie List Screen.
  • Movie Detail Screen.
  • Movie Search Screen.
20%

ViewModel & Utilities:

  • Interface with Room database as appropriate.
  • Search for movies and videos using REST API and converting JSON to corresponding POJOs.
  • Other related functionality.
20%

Navigation:

  • TopBar navigation used.
  • NavGraph properly in place.
  • Up arrow displayed when appropriate and navigate back to correct place.
15%

Structure:

  • Appropriate layers of abstraction implemented for MVVM.
  • Appropriate interface implemented for NavGraph.
  • Appropriate encapsulation for utilities.
5%

Submission:

  • Submission includes source code, Android Studio project, and README.txt. Submission compiles and executes.
Up to +10%

Extra Credit:

  • Allow the user to sort the list of movies by various criteria. This is done via the top bar.
  • Allow the user to filter the list of movies by various criteria. This is done via the top bar.
  • When searching for a movie, autohide the keyboard when the user clicks off the textbox or presses "done" on the keyboard.
  • Give the user the opportunity to undo adding and deleting movies in the database.

Submission


Please ensure your project produces an app with the name userName_A3. When you are completed with the assignment zip together your full source code (the Android Studio project), and README.txt. Name the zip file, userName_A3.zip. Upload this file to Canvas under A3.

This assignment is due by Tuesday, April 18, 2023 by 11:59pm.