Android Final Project: Book Exchange

I am now working on a final group project for the Android class. Since the final project for iOS was optional, I opted out so I could focus on the Android project with my team!

Our app is a bit like GoodReads in that it enables you to search for books. However, the added feature is that users can post books they’d like to sell, buy, or trade! Hence the name “Book Exchange”.

We are working in 4 weekly sprints in order to meet our December 3rd deadline.

So far we have completed 2/4 sprints!

During Sprint 1, we addressed the following user stories:

  • User should be able to register an account
  • User should be able to login
  • Login should be persistent
  • User should be able to logout

During this sprint, I was responsible for user registration. I used the Parse library to accomplish this. We also had to set up the backend in order to store our users and our book posts.

Here’s what our app looked like at the end of Sprint 1:

Sprint 2 was a bit more involved and I was assigned both user stories for this one:

  • User should see top sellers on search screen by default before query is sent via the search bar
  • Allow user to search by ISBN

To display best sellers on the search screen, I used the NYT Book API and displayed the information in a TableView within our default fragment. Within that fragment’s onActivity method, I put an event handler for a search field. This way, I was able to avoid using Android’s default search view and just use an EditText and Button for our search.

Once the user submits a query, the query String is put into a Bundle and passed to the SearchResults fragment where our Back4App backend is queried for results. I used the Parse library to get the results back as Post objects that can be added to a TableView within that fragment.

Parstagram Version 2

This is the final week of the CodePath classes before we begin final projects to showcase what we have learned! I worked on Parstagram version 2 in both Android and iOS.

For the Android version, I used Fragments for the first time. Instead of cramming a bunch of code into the MainActivity, I was able to separate the code into three fragments–one to display a user’s timeline of posts, one to show the user’s profile, and another to compose a new post. The corresponding views for each of these fragments are displayed depending on which menu item in a Bottom Navigation View is clicked on:

In the iOS version, implemented persistent login, the ability to logout, and the ever-so important ability to add and view comments on a post:

Back4App and Parstagram

This week was exciting because, instead of using an external API, we were able to create our own backend for an Instagram-like app in both Android and iOS. We used Back4App to get and post user and post data. This required use of the Parse library in both projects.

In the Android version of the application, I used Parse to enable a user to sign up for an account and to login. I also implemented persistent login and the ability for the user’s to pull up the system’s camera to take a picture, add a caption, and post it to the backend.

In the iOS version, I did the same thing, but also implemented the ability to view the last 20 posts (something that I will get to in the Android version next week).

Twitter Client Version 2

I improved both the Android and iOS versions of my simple Twitter client this week.

In the Android version, users can now compose and post a new Tweet through a compose button added to the ActionBar. After a user posts a tweet, the timeline is automatically refreshed! I used a library called Parcelable in order to pass information from one Android activity to another. Using Parcelable is more time/memory efficient than the Serializable interface.

On the iOS side, I also implemented the ability for a user to compose and post a Tweet. However, what differed from the Android implementation this week was that I also added the ability to favorite and retweet tweets!

Twitter Client Version 1

In both the Android and iOS classes, we created a simple Twitter client using Twitter’s API to authenticate a user to log them in and to fetch tweets from a user’s timeline to display them on the screen.

In the Android app, I also displayed the relative timestamp (e.g. how long ago a tweet was posted) next to each Tweet and implemented pull to refresh. I also tried to be a bit more creative with theming the app:

I also implemented pull to refresh in the iOS version of the Twitter client. In addition, I was able to implement persistent login and the ability to logout:

Flixter Part 2

This week, I worked on improving both the Android and the iOS versions of the Flixter.

In the Android app, I added a RatingBar that converted a movie’s score out of 10 to stars on a view for a particular movie. Using YouTubePlayerView, I also added the ability to play a movie’s trailer video in full screen:

In the iOS app, I added the ability to view a grid layout of movie posters matching a certain genre using a CollectionView and I also added the ability to tap on a TableView cell in order to view a detailed screen about a particular movie:

Web and Mobile Certificate

I’ve resumed teaching high school CS full-time, but I am also now working towards an advanced certificate in web and mobile applications development.

I was perhaps a little overzealous and enrolled in too many interesting classes initially:

  • Linear Algebra (this wasn’t required for my CS degree, but a lot of grad CS courses require it, if I choose to go on to a Masters/PhD)
  • Advanced Web Frameworks (part of the web and mobile applications program)
  • Android Development (a free course through CodePath)
  • iOS Development (another free course through CodePath)

I have decided to drop the linear algebra course since it is the only one that requires specific meet times, which made things a bit challenging since the course meets right after I finish teaching, when my brain was ready for a nap.

Here’s the first Android assignment I’ve completed, Flixter. It uses NYT’s Movie API to populate a TableView with information fetched from a query.

Animated gif of the Flixter app in use.

You can find more details about the app and its source code on Github!

We also did the Flixter assignment in the iOS class using Swift:

Here is my project on GitHub