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.

Parstagram application on Android demonstrating persistent login.

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.

Twitter Client demo Version 2

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: