Popular Movies App Implementation Guide
Stage 1: Main Discovery Screen, A Details View, and Settings
Implementation Guidance - Stage 1
Using Picasso To Fetch Images and Load Them Into Views
Working with the themoviedb.org API
A note on resolving poster paths with themoviedb.org API
Additional Resources - Webcasts for P1
Stage 2: Trailers, Reviews, and Favorites
Implementation Guidance - Stage 2
Working with the themoviedb.org API
Additional Resources - Webcasts for P2
Most of us can relate to kicking back on the couch and enjoying a movie with friends and family. In this project, you’ll build an app to allow users to discover the most popular movies playing.
You’ll build the complete functionality of this app in two stages which you will submit separately.
In this stage you’ll build the core experience of your movies app.
Your app will:
We recommend that this project use Picasso, a powerful library that will handle image loading and caching on your behalf. If you prefer, you’re welcome to use an alternate library such as Glide.
We’ve included this to reduce unnecessary extra work and help you focus on applying your app development skills.
You’ll need to modify the build.gradle file for your app. These modifications will happen in the build.gradle file for your module’s directory, not the project root directory (it is the file highlighted in blue in the screenshot below).
In your app/build.gradle file, add:
repositories {
mavenCentral()
}
Next, add implementation 'com.squareup.picasso:picasso:2.71828'
to your dependencies block.
You can use Picasso to easily load album art thumbnails into your views using:
Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView);
Picasso will handle loading the images on a background thread, image decompression and caching the images.
You will notice that the API response provides a relative path to a movie poster image when you request the metadata for a specific movie.
For example, the poster path return for Interstellar is “/nBNZadXqJSdt05SHLqgT0HuC5Gm.jpg”
You will need to append a base path ahead of this relative path to build the complete url you will need to fetch the image using Picasso.
It’s constructed using 3 parts:
Combining these three parts gives us a final url of http://image.tmdb.org/t/p/w185//nBNZadXqJSdt05SHLqgT0HuC5Gm.jpg
This is also explained explicitly in the API documentation for /configuration.
IMPORTANT: PLEASE REMOVE YOUR API KEY WHEN SHARING CODE PUBLICALLY
If you ever upload your code to a public GitHub repo to share with other students or instructors, it’s illegal to include your personal themoviedb.org API key. Please remove it and note in a README where it came from, so someone else trying to run your code can create their own key and will quickly know where to put it. Instructors and code reviewers will expect this behavior for any public GitHub code.
If you happen to commit your API key into version control on accident, check out this GitHub guide on removing sensitive data in order to remove it.
IMPORTANT: PLEASE MAKE SURE YOUR APP CONFORMS TO THE QUALITY GUIDELINES MENTIONED HERE
These Webcast resources are only available for students enrolled in the Android Developer Nanodegree. |
There are some concepts you will need to implement in this project that are not explicitly covered in the course material. We’ve created these Webcast Videos to supplement your learning. (Note: You need to be in the G+ community to access the webcasts. If you are already a member but are still unable to access them from the links below, try accessing them via Your Nanodegree home page → Resources → Google+ Webcast.)
Topic | Notes | Video |
Creating and Using a List with RecyclerView | ||
Parcelables and onSaveInstanceState() | ||
How to Use the Movie Database API |
Your project will be evaluated by a Udacity Code Reviewer according to
▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂
In this stage you’ll add additional functionality to the app you built in Stage 1.
You’ll add more information to your movie details view:
IMPORTANT: PLEASE MAKE SURE YOUR APP CONFORMS TO THE QUALITY GUIDELINES MENTIONED HERE
The Webcast resources are only available for students enrolled in the Android Developer Nanodegree. |
There are some concepts you will need to implement in this project that are not explicitly covered in the course material. We’ve created these Webcast Videos to supplement your learning. (Note: You need to be in the G+ community to access the webcasts. If you are already a member but are still unable to access them from the links below, try accessing them via Your Nanodegree home page → Resources → Google+ Webcast.)
Topic | Notes | Video |
Content Providers | Stetho guide - an Android app debug tool | |
RecyclerView | ||
AppCompat | ||
Activity Lifecycle |
Your project will be evaluated by a Udacity Code Reviewer according to this rubric for Stage 2.
Again, please remember to remove your API key before you submit through GitHub.
Be sure to review it thoroughly before you submit. All criteria must "meet specifications" in order to pass.
▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂