Skip to content

kaushiknsanji/Android-Basics-Nanodegree-Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

Udacity Android Basics Nanodegree Projects

Curriculum built by Google for aspiring Android Developers who are new to programming, that trains them to acquire the real-world skills and teaches how to build and accelerate their journey towards becoming a professional Android developer.

Core Curriculum

Consists of lessons, tutorial projects and submission projects that teaches the following parts in detail -

  • User Interface

    • Explains how to transform any hand-drawn app designs into layouts using the XML markup language, with Views and ViewGroups, which are the building blocks of an Android app's user interface to display images and text.
    • Submission Project-1: Single Screen App
  • User Input

    • Elaborates on the power of Java through the process of building a coffee-ordering app, using variables to add interactivity to the app, while educating the basics of object-oriented programming.
    • Submission Project-2: Score Keeper App
    • Submission Project-3: Quiz App
  • Multi-Screen Apps

    • Explains how to show multiple screens in a Miwok language app, incorporating audio and images to the app, while educating how Android handles touch events. Also, instructs on how to make visual changes in order to polish a fully functional app.
    • Submission Project-4: Musical Structure
    • Submission Project-5: Report Card class
    • Submission Project-6: Tour Guide App
  • Networking

    • Elaborates on the power of Web APIs and explains how to use them in apps for learning the basics of networking in Android, including HTTP networking, JSON parsing, and threads.
    • Submission Project-7: Book Listing App
    • Submission Project-8: News App
  • Data Storage

    • Educates about the importance of data persistence when building an Android app. Explains how to work with SQL databases and Content Providers, which helps to keep the app's data bug-free and allows to share an app's data storage with other developers.
    • Submission Project-9: Habit Tracker App
    • Submission Project-10: Inventory App

Project Submissions

1. Single Screen App - Invitation

GitHub GitHub code size in bytes GitHub repo size GitHub release (latest by date) GitHub All Releases GitHub stars GitHub forks Minimum API level

Invitation is a Single Screen App that displays details of a particular location of interest which includes "Contact information", " Location Address", "Description of the Business" and "Hours of operation".

Topics learnt/explored

  • Transforming designs into layouts using RelativeLayout and TableLayout ViewGroups.
  • Usage of ScrollView, TextView, ImageView and designing Dividers using View.

Sample Screenshots

Review from the Reviewer (Udacity)

Review_Single_Screen_App

2. Score Keeper App - Tennis Scoring

GitHub GitHub code size in bytes GitHub repo size GitHub release (latest by date) GitHub All Releases GitHub stars GitHub forks Minimum API level

Tennis Scoring is the Score Keeper App for Tennis, based on the rules followed in the Grand Slams for Men's and Women's Tennis. It has a Single Screen that displays the Scoreboards for the Tennis Match, as well as tracks and manages the scores of each Player during the Play.

Topics learnt/explored

  • Using LinearLayout with weights.
  • Registering Buttons with Click listener.
  • Usage of App resource values for colors, dimensions, strings and styles.
  • Saving the state of Text values shown in TextView and Button, post configuration change.

Sample Screenshots

Start of the Match Scoring in a Set Scoring in a Tie-Breaker Match Finish
Initial_Portrait_1 Intermediate_GamePlay_Score Intermediate_TieBreaker_Score Match_finish

Review from the Reviewer (Udacity)

Review_Score_Keeper_App

3. Quiz App - Quiz of Aves

GitHub GitHub code size in bytes GitHub repo size GitHub release (latest by date) GitHub All Releases GitHub stars GitHub forks Minimum API level

Quiz of Aves is a Quiz App on Birds, that has a total of 50 questions in variety of formats such as "free text response", checkboxes (Multi-choice) and radio buttons (Single-choice). It presents the user with a randomly selected set of questions (read from the String resources) for the number of questions the user wishes to take the quiz, with options for "Multi-choice" and "Single-choice" questions displayed in a random order. For each question, user is presented with an optional Hint after an incorrect attempt, that shows an Image of the Bird(s) in question as a hint when requested by the user to reveal the hint, which in turn means that the user gets a second chance to answer each question. Entire quiz is timed, and the timer value is set accordingly to the number of questions selected by the user, by allocating 45 seconds for each question. The timer runs even when the app goes into background. At the end of the quiz, a dialog will show up for displaying the final score to the user.

Topics learnt/explored

  • android.os.AsyncTask for downloading the images for each of the questions. Headless Fragment has been used for managing this Custom AsyncTask.
  • android.util.LruCache for caching the Bitmaps downloaded.
  • android.os.CountDownTimer for the Quiz Timer. Headless Fragment has been used for managing the CountDownTimer, designed as a latch that adds functionality such as Pause and Resume.
  • DialogFragment to display the Number Picker Dialog for the user to select/enter the number of questions to attempt.
  • DialogFragment for displaying the Progress of Image Download, with a custom progress bar layout.
  • DialogFragment for displaying the Final score at the end of the quiz or when the quiz timer elapses.
  • Intents for moving from one activity to the other.
  • Id resource for the components generated programmatically.
  • Nine patch images used as a background image for the question and option fields.
  • Level List Drawable for decorating the options.
  • State List Drawable of shape drawables with gradient for the Submit/Hint buttons.
  • String array resources for storing the questions, their options and keys.

Sample Screenshots

Welcome Screen Text input Question Single-choice Question Single-choice Question - Correct Answer
welcome_screen textual_question mcq_selected_answer mcq_incorrect_answer
Multi-choice Question Multi-choice Question - Correct Answer Answer Hint Score on Completion
mcq_checkbox_selected_answers mcq_checkbox_incorrect_answer textual_question_answered_2 score_on_completion

Review from the Reviewer (Udacity)

Review_Quiz_App

4. Musical Structure - Rhythm

GitHub GitHub code size in bytes GitHub repo size GitHub release (latest by date) GitHub All Releases GitHub stars GitHub forks Minimum API level

Rhythm App is a Musical Structure App that showcases a structure/approach typically used for Apps that play music, without implementing its functionality. Each screen in the App displays a Text describing about the screen and what functionality goes into it. Mocking or adding real content is not allowed as per the Project Rubric. Static data from resources are only allowed. As mock up is not allowed, AdapterViews and RecyclerViews are not used. This enables more practice with using layouts. Hence, the Project mainly focuses on App designing.

Topics learnt/explored

  • Fiddled with CoordinatorLayout along with CollapsibleToolbar and DrawerLayout.
  • Used ConstraintLayout heavily for most of the layouts along with custom styles.
  • Created a custom WindowInsetsFrameLayout for dispatching the Window insets from the DrawerLayout to the Fragments shown in this FrameLayout's container, when its FitSystemWindows property is set.
  • Implemented Base class architecture for abstracting the common tasks to be executed by Activities and Fragments.
  • Persistent Bottom Player is shown in many Fragments and Activities. PlayerActivity and PlayerFragment extends the Base classes for Activities and Fragments respectively to abstract the implementation details of the persistent Bottom Sheet.
  • Common tasks of the Drawer Fragments shown in the HomeActivity are abstracted by DrawerFragment abstract class that extends the PlayerFragment abstract class, as they also need to show the Persistent Bottom Player.
  • Music Player controls are simulated by using a Bound Service PlayerService. It provides the necessary Play/Pause/Restart methods to control the Player progress value generated by an Internal Worker Thread.
  • Implemented a custom AppBarLayout Behavior to control the Nested scroll events on Layouts with Bottom Sheets, to prevent the scroll from being consumed by the Layout behind the Bottom Sheet when a scroll event occurs on the Expanded Bottom Sheet.
  • Implemented a custom FloatingActionButton Behavior to control the visibility and appearance of the FloatingActionButton when anchored to views other than AppBarLayout or views with BottomSheetBehavior, as these are taken care by default.
  • Implemented a BottomSheetDialogFragment to show a dialog appearing from the Bottom, to capture the Payment when the user tries to play a song from any of the Jukebox services, to simulate the Paid service.
  • Used Animated Vector Drawables for transitioning between "Play-Pause" and "Like-Unlike" drawables through animations.

Sample Screenshots

Drawer Home Bottom Sheet Player Songs
Drawer Home Bottom_Sheet_Player Songs
Albums Album Detail Artists Artist Detail
Albums Album_Detail Artists Artist_Detail

Review from the Reviewer (Udacity)

Review_Musical_Structure

5. Report Card class - Report Card App

GitHub GitHub code size in bytes GitHub repo size GitHub stars GitHub forks Minimum API level

Report Card App is an exercise project aimed at learning how to create and interact with custom Java classes. As such, it is just a Java class, rather than a full Android App. This project has no UI components. It contains only a Model Class ReportCard that helps in managing and recording a student’s grades for a particular year.

Topics learnt

  • Designing a custom POJO/Model class.
  • Creating the POJO/Model class in Java code.
  • Storing information in a collection and reading the same.

Review from the Reviewer (Udacity)

Review_Report_Card_App

6. Tour Guide App - XploreMysuru

GitHub GitHub code size in bytes GitHub repo size GitHub release (latest by date) GitHub All Releases GitHub stars GitHub forks Minimum API level

XploreMysuru App is a Tour Guide App that guides a user in exploring the "City of Palaces"/"Mysore". It contains 5 lists of relevant attractions comprising of Places, Parks, Hotels, Restaurants and Shops, presented with BottomNavigationView for easier navigation between the lists. All the information (including pictures) for each of the attractions are stored locally and read from App resources.

Topics learnt/explored

  • Used ConstraintLayout heavily for most of the layouts along with custom styles.
  • Implemented MVP + Repository pattern with App Resources.
  • Explored BottomNavigationView for Navigating between the lists of attraction.
  • Implemented Snap Behavior for BottomNavigationView that hides the BottomNavigationView when more than or equal to half of its height is translated away. The Behavior also takes care of docking the Snackbar on top of the BottomNavigationView when shown.
  • Used CardView for displaying each place of attraction.
  • Implemented Loading of Images in a background thread through a Headless Fragment.
  • Developed BitmapImageCache utility that uses android.util.LruCache to cache the recent Bitmap Images decoded.
  • Carried out Image decoding in a background thread using ImageDecoder that extends AsyncTaskLoader.
  • Developed BitmapUtility to extract Palette Swatches from the Images.

Sample Screenshots

Places Hotels Restaurants (Expanded Item) BottomNavigationView (Docked Snackbar)
place_portrait hotel_portrait restaurant_item_expand shop_no_link_2

Review from the Reviewer (Udacity)

Review_Tour_Guide_App

7. Book Listing App - Books Library

GitHub GitHub code size in bytes GitHub repo size GitHub release (latest by date) GitHub All Releases GitHub stars GitHub forks Minimum API level

Books Library App is a Book Listing App that connects to the Google Books API to retrieve the list of Books for the topic searched and then displays them in a decorative BookShelf format. Provides users the ability to control the Search Results through the various API supported parameters, provided in the Search Settings of the App. The Search box features the API supported search keyword filtering which narrows down the results to the keyword being looked up.

Topics learnt/explored

  • Assisted Search Implementation with SearchView.
  • Used RecyclerView in place of ListView and GridView for its advantages in performance and easy placeholders for custom item decoration.
  • Custom RecyclerView.ItemDecoration for decorating each of the items in List/Grid with the Book shelf decoration.
  • Explored FragmentStatePagerAdapter that displays the Fragments (retaining their state) for the ViewPager.
  • Implemented android.support.v7.preference.Preference Preferences for the Settings.
  • No external libraries are used for communicating with the REST API and also for loading the images. AsyncTaskLoader has been used for downloading the data and images in the background thread. Images are downloaded using a Headless Fragment.
  • Developed BitmapImageCache utility that uses android.util.LruCache to cache the recent Bitmap Images downloaded.
  • Most layouts are designed using ConstraintLayout to flatten the layout hierachy as far as possible.
  • Indeterminate progress bar is implemented with animation-list / AnimationDrawable.
  • TextAppearanceUtility for decorating TextViews using Spannables, for strikethrough, image within text, selective text coloring and relative text resize.
  • CardView for displaying the information of a Book.

Video Preview

Video of Complete App Flow

Sample Screenshots

Search Screen Recent Search Suggestions Results - List Results - Grid
welcome_page assisted_search list_view grid_view
Book Details - 1 Book Details - 2 Book Image Settings
details_portrait_1 details_portrait_2 book_image_view search_settings

Review from the Reviewer (Udacity)

Review_Book_Listing_App

8. News App - NovaLines

GitHub GitHub code size in bytes GitHub repo size GitHub release (latest by date) GitHub All Releases GitHub stars GitHub forks Minimum API level

Novalines App is a News App that connects to the Guardian News API to retrieve the News Feed based on a particular endpoint and then displays them as a list. It implements the section and search endpoints. By default, the App loads "Top Stories", "Most Visited" and "World news" sections. It parses the News Feed for the subscribed News section or the searched News, and then displays the list of News Articles in Cards. On top of these News Articles, many useful features are provided, like -

  • Sharing the News Articles.
  • Saving the News Article to Bookmarks for Reading later (Stub only).
  • Saving the News Articles to Favorites (Stub only).
  • Jumping to a particular News section /or temporarily subscribing to a News section.

Topics learnt/explored

  • Used RecyclerView in place of ListView (to display the News stories) for its advantages in performance and easy placeholders for custom item decoration.
  • Custom RecyclerView.ItemDecoration for adding space between the News List items.
  • CardView for displaying the News stories content for each News List items.
  • Custom Navigation Drawer Items implemented using RecyclerView.
  • Explored FragmentStatePagerAdapter that displays the Fragments (retaining their state) for the ViewPager. Also, mocks the dynamic adding of additional tab content to the ViewPager.
  • Implemented Settings using android.support.v7.preference.Preference.
  • No external libraries are used for communicating with the REST API and also for loading the images. AsyncTaskLoader has been used for downloading the data and images in the background thread. Images are downloaded using a Headless Fragment.
  • Developed BitmapImageCache utility that uses android.util.LruCache to cache the recent Bitmap Images downloaded.
  • Most layouts are designed using ConstraintLayout to flatten the layout hierarchy as far as possible.
  • TextAppearanceUtility for decorating TextViews using Spannables, for image within text and html content in text.
  • Custom Fonts for TextViews using ResourceCompat.
  • Explored CoordinatorLayout.
  • Used RecyclerView in a SwipeRefreshLayout to use the integrated Progress/Refresh indicator.
  • Used DiffUtil in RecyclerView to help rebind only the item views that have changed.

Video Preview

Video of Complete App Flow

Sample Screenshots

Drawer Highlights Most Visited (with News Item Popup Menu) Settings
drawer_layout headlines_fragment card_item_popup settings_screen

Review from the Reviewer (Udacity)

review

9. Habit Tracker App - HydrationTracker

GitHub GitHub code size in bytes GitHub repo size GitHub release (latest by date) GitHub All Releases GitHub stars GitHub forks Minimum API level

HydrationTracker App is a Habit Tracker App, where the habit tracked is the daily habit of Hydration. It is recommended to drink 1-2 litres of Water per day for Good Health, but this also depends on how much one expends/dehydrates. So, at least 1 litre of Water per day is a Good Habit and 1 litre amounts to 8 Glasses of Water. App illustrates the use of SQLite database for tracking the user's daily habit of Hydration. This App only demonstrates the behavior of SQLite database for the CRUD operations executed, in an intuitive manner for better understanding. As such it has a basic UI that exposes details of what happens when any CRUD Operation is executed, and cannot be used as your daily tracker.

Topics learnt/explored

  • Learnt how to create SQLite tables and execute CRUD operations.
  • Although defined in the Rubric that no UI is required, I went ahead and did a simple UI to display only the recent records, to know what is going on in the backend.
  • Explored Handlers and HandlerThreads to perform database operations in a background thread.
  • TextAppearanceUtility for decorating TextViews using Spannables, for html content in text, and coloring a part of the text.
  • Designed the layout with TextInputLayout and TextInputEditText to capture User input.

Video Preview

Video of Complete App Flow

Sample Screenshots

Initial Stage of No records No records with only Insert button When records are Added/Deleted Input for "Glass of Water" drank with buttons for CRUD operations
initial_launch_1 initial_launch_2 database_counts_sample table_sample

Review from the Reviewer (Udacity)

review

10. Inventory App - StoreApp

GitHub GitHub code size in bytes GitHub repo size GitHub release (latest by date) GitHub All Releases GitHub stars GitHub forks Minimum API level

StoreApp is an Inventory App, that allows a Store to keep track of the inventory of its Products across the listed Suppliers of Products, and record sales information. Allows a Store user to save every information of a Product along with its pictures and Suppliers information with their price and available to sell quantity. It features Product procurement from Suppliers via the supplied Contact information of Suppliers recorded.

Topics learnt/explored

  • Storing required information in a SQLite database.
  • Designing and developing the Database Schema with relationships between Product, Supplier, Selling Price, Inventory, Images, Additional Product information and Supplier Contact Information to enable -
    • Multiple Seller registration per Product with their own Selling Price, Availability and Contact information.
    • Multiple Contacts per Seller, supporting different Contact Types like Phone and Email.
    • Multiple Product Photos.
    • Additional Attibutes that further defines the Product.
  • Integrating Android’s File storage systems into the database for Images. Images are persisted by saving the Image files' Content URI in the database instead of storing the entire BLOB of the Image.
  • Communicating with and managing the Database through a Content Provider.
  • Communicating with the File Storage through a File Provider for saving and accessing the Images of a Product.
  • Presenting information from Files and SQLite databases to users.
  • Designing layouts with TextInputLayout and TextInputEditText to capture User input, validating the captured information to display the required error, and updating the database with the information.
  • Creating intents to other apps such as the File Picker App for selecting images and the Image Capture App for taking pictures, using stored information.
    • Capturing Images is accomplished using ACTION_IMAGE_CAPTURE Intent, and processing the Image for storage is done using a custom ImageStorageUtility in a Disk thread provided by AppExecutors.
    • Selecting Images is accomplished using ACTION_GET_CONTENT/ACTION_OPEN_DOCUMENT Intent, based on the Android system version.
  • Promoting the separation of concerns using the MVP Architecture with Content Providers along with Repository pattern for Datasource that includes local files and database storage. Dependency injection is accomplished using a static InjectorUtility.
  • Designing layouts using CoordinatorLayout and ConstraintLayout.
  • Designing Item Views using CardView.
  • Loading of Images using a custom Headless Fragment through an AsyncTaskLoader and caching recently loaded images using BitmapImageCache that internally uses android.util.LruCache.
  • Live Debugging using Stetho to see and validate the changes following any CRUD operation during the development process, in order to ensure that the operations are working as intended.
  • Presenting Product Attributes information using a TableLayout with its data populated dynamically.

Sample Screenshots

Products List Suppliers List Sales List Sample Product Config
productslistportrait supplierlist saleslist addproduct1

Review from the Reviewer (Udacity)

review


Certificate of Completion

Udacity Android Basics Nanodegree Certificate

License

Copyright 2019 Kaushik N. Sanji

Licensed under the Apache License, Version 2.0 (the "License"); 
you may not use this file except in compliance with the License. 
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0
   
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.