In Part 1 of the Nanodegree, I learned about the XML markup language. I also learned how Views and ViewGroups are used to create user interfaces in Android.
At the end of Part 1, I was tasked with building a simple, single-screen application that displayed the contact information for a local business.
Since I am the founder of Fall3nWarrior.com, I decided to use my company’s contact information. I created a simple layout with some TextViews and ImageViews and selected colors to match my brand.
In Part 2 of the Nanodegree, I learned how to harness the power of Java to add interactivity to my applications via user input and the basic principles of object-oriented programming.
For the first project of Part 2, I was tasked with building a scorekeeper application that provides the user with an easy way to keep track of the score of two different teams playing a game of my choice.
Since I played baseball when I was younger, I created an application that tracks the score of two baseball teams, the current count, and the number of outs in an inning. I also added a color scheme that matched the color of most baseball fields and an image of home plate.
At the end of Part 2 of the Nanodegree, I was later tasked with creating a Quiz application to test my understanding of Java and the use of different Views to receive input from the user.
Since I love studying History, I chose World War II as the topic and began creating a layout for the Quiz. By using, an EditText field, CheckBoxes, RadioButtons, RadioGroups, and a ScrollView, I was able to create a simple, vertical, nested, LinearLayout for the Quiz.
At the end of the ScrollView, I added a button that called a function to parse and check the answers entered by the user. It also displayed the Quiz results in a toast message.
In Part 3 of the Nanodegree, I learned how to add different screens to an application, in the form of Activities, using Java. I also learned Explicit Intents and OnClickListeners in order to switch between the different Activities and to add additional behavior to Buttons.
For the first project of Part 3, I was tasked with building the basic structure of a Music Player application. I had to create several different Activities and layouts for each screen in the application. I utilized ButtonViews and Explicit Intents to allow the user to navigate between the different parts of my application. I created a Search, My Library, Now Playing, Store, and a Checkout for a total of five different activities. As an additional step, I displayed the purpose of each Activity in a TextView within each Activity.
In the middle of Part 3 of the Nanodegree, my second project focused upon Custom Java Classes and how they make up a critical part of every object-oriented program. I was tasked with writing a Custom Java Class that could be used to store scores on a student’s report card. The custom class was required to have, at least one constructor to instantiate all variables in the class, getter and setter methods to access and modify the private variables in the class and a toString() method which returns the contents of the class in a human-readable string. The resulting Java Class Source Code can be found below.
At the end of Part 3 of the Nanodegree and for the last project in this section, I was tasked with creating a multi-screen tour guide application for a user visiting my city. The application was required to list top attractions, restaurants, public places and events. Since I live in New York, I had many places to recommend.
First, I created a Main Menu featuring four categories of places to visit, which included Restaurants, Parks, Museums and Entertainment. Each category displayed a list of relevant places and information. By tapping on a location, the location opened in the Google Maps application on the user’s device. After adding all of the locations and relevant information for each site to visit, I created a simple layout and color scheme to show the information in an easy-to-read, user interface design.
In Part 4 of the Nanodegree, networking in Android was the focus. I learned about HTTP Networking and how to make requests using Java. I also learned how to parse JSON responses from API’s on separate threads, other than the main thread of my application, using AsyncTasks.
For the first project of Part 4, I was tasked with making a book listing application whose purpose was to allow a user to get a list of published books on a given topic. I also had to use the Google Books API to gather search results and display them to the user.
As a result, I created a simple ScrollView with a SearchView for the user to fill in with their search query. When the user pressed search on their keyboard, the application made an HTTP request to the Google Books API and parsed the JSON response using an AsyncTask. Lastly, it populated a ListView with the results of the user’s query. If the search did not return any results, the application displayed a simple message entitled, “No Books Found.”
For the second project of Part 4, I was tasked with making a news application, whose purpose was to allow a user to get a list of the most recent news articles from a news API of my choosing. The goal of the project was to use an unfamiliar API and create an application to access and display information from the unfamiliar API. I decided to use The Guardian’s API for this project.
To begin, I created a simple layout instructing the user to swipe down on their screen to get the latest news. When the user swiped down, the SwipeRefresh Layout called a function to make an HTTP request to The Guardian’s API and parsed the JSON response, using an AsyncTask. Lastly, it populated the ListView Layout with the most recent news articles in a simple and easy-to-read layout. If the API request did not return any results, the application displayed a simple message “No News Found. Has The World Ended?” Lastly, if the user tapped on an article, the chosen article would open in the user’s default browser via an Implicit Intent.
The SwipeRefreshLayout was added to this application as a bonus since it was not a requirement of the project. I took the initiative to learn how to implement it within my project to add an additional, user-friendly function to the application.
In Part 5 of the Nanodegree, we learned about the importance of data persistence when building Android applications. Specifically, we learned how to work with SQL databases and ContentProviders and how they can help keep our application data bug-free and allow us to share our data storage with other applications and developers. We essentially learned how to create, initialize and implement a SQLite database in our application. We also learned how to create a DBHelper class to safely read and write data to our database.
The first project for Part 5 was to show that we properly created, initialized and implemented a SQLite database. I was tasked with creating the structure of a habit-tracking application. The project consisted of only a few Java classes because programming was the focus. A user interface was not required in this project. Therefore, in the three classes below, I created and initialized a SQLite table and implemented methods to read, write and modify the data in the database.
For the final project of the Nanodegree, I was tasked with creating a multi-screen inventory tracking application for a user or business, so they could keep track of their product inventory.
Using my newly acquired knowledge of SQLite and ContentProviders, I created a simple layout that allowed the user to add a product to their inventory. By pressing the plus button in the MainActivity, the user added a new product along with an image and any additional relevant information. Upon saving the product, all entered data was validated and stored in the database. A product could be edited by tapping on it and updating the information. Also, a product could be deleted by pressing the delete button in the Options Menu, at any time. If the user made a change to the product information and left the activity without saving, they were prompted to save or discard the information. The same process occurred whenever data was deleted by the user.
In terms of inventory counts, pressing the “Sale” button on the MainActivity reduced the chosen product’s remaining quantity by one. And the “Order More” button on the Add or Edit Product activities created an email via Implicit Intent using the supplier’s email information so that the user could replenish their inventory with more products.