My experience of building my first Android app

Đức Lê Trần Anh
letrananhduc
Published in
4 min readJan 18, 2019

After one month of learning Android last year, I had managed to code my own Android app. It is an app to get the latest news from many great tech blogs, suggestions for travel’s location, artworks, and music charts. Here is my own reflection on the time coding that project.

You can find more information about this Customized New Feed App on my Github link here.

How did I do it?

I first learned the basic of making Android apps through the series of online courses from Google on Udacity. And then, I came up with an idea to compose all the news from a lot of Tech blogs/websites/magazines into one app so that I don’t have to waste time on the browser. This led to exciting challenges about working with API, reading JSON data, connecting the app to the internet…

I spent most of the time figuring out which is a good API to use because for many reasons:

  • I didn’t work with API before.
  • Each websites’ API has different name fields or attributes that satisfies my need.
  • Some APIs are harder to get because I have to request a key from that company (Some companies didn’t even provide me a key so I have to find another API, which cost a little bit of time).

After that, I parsed all the data I got from the API to views, which are in different fragments and then built up the whole app from 4 fragments. I also had to learn and import some new library to work with images so that I can display them nicely and use features like zooming, panning,…

I took me around 10 days to finish the whole things, even though there are still a lot of bugs in the app, the general functionalities are working.

What did I learn?

A lot!

Making an Android app that can serve your own need like this is really simple, but polish it into a bug-free eye-catching app is really difficult, especially to a perfectionist like me. Here are the things I learned while coding it:

  • Basic features in Android Studio like working with API, connecting to the Internet, working with Android lifecycle, wireframing/designing the view objects, working explicitly with images, …
  • Dealing with versions in Gradle is such an annoying thing because there are so many versions.
  • App Development can help your phone battery stay high.
  • Learning to look up for questions/bugs from the internet.
  • Looking up for documentation from Android Studio or blogs post from Medium about some explicit features/classes. This Android community is actually developing really nicely with a lot of talented people who are sharing ideas.
  • The cool things about starting the first Android app is that when you use other apps in your phone like Facebook, Instagram, Clock, Weather,… you start to see it in a different way. You can have the capabilities to build most of the simple app in your phone like clock, alarm, calculator, weather app, notes in just a short amount of time (maybe a few weeks or a month for beginners like me). You look at every single component of other app and understand how were they created.
  • Splitting your project into smaller pieces/fragments and structuring your own projects into readable files saved a lot of time, but learning to do that as a beginner also took me quite a bit of time(still I find it really important).
  • It is more annoying at first to write the values of word/color into color, string.xml file. But you should not hard code those in your layout. It is just a small thing but when I try to change it, I find it more time-consuming.

What were some of the problems that I found annoying?

I find working with API, Internet Connection and Android Lifecycle are the hardest.

For API, it’s all about learning to work out the documentation provided and trying to find the APIs that fits my needs. I have explained it in the section above.

For Internet Connection, it’s just a lot of stuff to cover for a beginner like me. Knowing how to set up an HTTP request took a while. I also had to deal with all the possibilities to the views when it comes to internet connection: situations where a connection is lost or slow or maybe there is no internet connection. Another important thing is that internet connection request cannot be run in the main thread because it makes your app crash for a while, that’s while figuring out how to work with threads was also a challenge for me.

A lot of things could happen to your views. Maybe you rotate your phone, maybe you come back from your own created intents, maybe you come back from other apps. There are just so many possibilities that could screw up the current lifecycle state, and I had to learn a lot to deal with that. For me, understanding how lifecycle work was maybe the hardest part in the project, and it was also the part the produced the largest amount of bugs.

What will I do in the next Android projects for better results?

I guess what I would do in my next project is to aim for a bigger project (big enough that I have to make a more detailed plan). In this project, I didn’t spend much time planning because the idea was rather simple.

I would draw a class diagram so that I can manage everything better.

I would use Log debug/Toast more because I guess I would help me better when I encounter bugs.

I would try to use variations of other group views, not just simple list views in this project.

So that’s how I manage to make a simple but my own Android app.

If you found this post informative, please hit the clap👏 button, share, and connect with me!!

--

--