Project built for Udacity's Android Nanodegree.
Android app that fetches and displays movie information from The Movie Database (TMDb). The user can check the details of a chosen movie and add the movie to a "favorite movies" list for easier access.
- Main View presents the user a grid of movie posters. The sort order can be changed in the Settings menu (sort criteria: most popular, highest rated, user's favorite).
- Selecting a movie poster will open a screen with additional information on the movie.
- In the movie details screen, the star shaped button allows the user to mark a movie as favorite.
- Tapping a trailer video will display the video by opening either the youtube app or a web browser.
Android Architecture Components:
- The user's favorite movies information are stored in a Room database.
- LiveData from ViewModel is used to not re-requery database unnecessarily after screen rotation.
Clone the repository using git (or download it as a zip), then import the project in Android Studio.
git clone https://github.com/ootahiaoo/PopularMoviesProject.git
The app fetches information from The Movie Database (TMDb) API.
You need to register and get your own API KEY in order to use this app. Once you have a key, create a gradle.properties
file:
- From the Project panel, change the view from
Android
toProject
directory. - Right click on the
PopularMoviesProject
file > New > File - Put the name as gradle.properties
- If asked about "Open matching files in Android Studio", select
Properties
type.
Then paste the following line in the gradle.properties
file, including your API key instead of your-api-key
.
myApiTheGuardian="your-api-key"
If AndroidStudio still complains, please check that the BuildConfig is importing the right option in the MainActivity.java file.
To be added.
Feel free to make pull requests/suggest improvements.