Sunday, April 15, 2018

How Exactly Do I Start Android Programming?

There are two main things you need to begin to learn how to code. The first is practical knowledge, what language to learn, what sort of SDK (software development kit) to use, where to go for help, etc. The second, which I would argue is more important, is motivation. If you have an idea for a project that you want to build, learning to program will be much easier. While it is probably a good idea to start with a simple project, if your dream project is something large and complicated you can still break it down into bite sized chunks.

As for practical knowledge, I mentioned previously that I started by doing the Oracle Java Tutorials and didn't feel that they were helpful in learning about Android programming. However, after sleeping on it, I think that by following those tutorials it 'primed the pump' as it were and helped me understanding all the stuff I learned later.

Anyway, let's do this in list format so it is a bit easier to follow:


  1. Have an idea - before you start it is a good idea to have at least a general idea of what kind of project you want to design. This will help with motivation and guide your learning so you can complete the project. It doesn't need to be a detailed road map, in fact I think it is better to keep your idea flexible so that it can change as your knowledge grows. For example, I have ideas for a lot of projects that turn out to be completely infeasible, but with a flexible mentality they often turn into other projects that are possible for me to complete.
  2. Oracle Java Tutorials - Take a look at the first three to five beginner tutorials here. There is really no need to go further than that because they don't apply to Android development, but definitely the first three will be a great primer on how everything works. Particularly the second tutorial will be useful for people who are just starting out.
  3. Install Android Studio - Now it is time to start the actual task of development. Download Android Studio, install it and get ready.
  4. Use Android Tutorial - Check out the early developer guides provided at developer.android.com. These get pretty in depth, but if you go through just the first couple of them that will give you an idea of how Android development works.
    1. Android Studio can compile native C code as well as Kotlin and Java, but I recommend sticking to Java for the time being because there are a huge number of resources for using Java in Android development and that will come in handy as you learn.
  5. Fool Around - Now you should have an extremely rudimentary idea of how to develop a basic Android app. Try things out on your own. Add pictures and text, add links, try to change things programmatically, try to implement some code related to your app idea. A lot of this will not work, and that's OK. You can keep trying things and testing ideas, and it will give you a good idea what you want to learn and what direction you want to take your app idea in.
  6. Search Stack Overflow - This is the single most helpful thing you can do as a beginner Android developer. Once you have figured out what you want to do and have realized that you don't know how to do it, it is a great time to go look at Stack Overflow. Nearly every question under the sun has already been asked and answered with code samples and explanations on how everything works. 
    1. In addition to looking at the code in the answers provided, it is good to look at the code provided in the questions because we can see the kinds of problems people are running into. This will help us avoid these problems in the future.
    2. It is ok if you don't understand what the code means right away. Some of the stuff is more complicated than others, and there is definitely going to be code that is opaque to you.  This is fine, because a nice  thing about Stack Overflow is that people leave explanations in addition to code samples. Follow along as best you can.
    3. Don't be afraid to copy and paste code fragments into your own code and try to make it work. This is a great way to learn and it can help you figure things out on your own.
  7. BACK UP YOUR CODE - Once you start making simple apps it is a good idea to open an account at Github or Bitbucket to keep your code backed up.  Both are fine, and there are other options out there, but I personally use Bitbucket because it allows you to keep your code private (Github does this with a paid tier, but on Bitbucket you can do it for free). This might not be a big deal to you, but I am a little bit ashamed of my code, so I don't want others to see it.
  8. Sign up for a Google Play Developer Account - Once you have an app you feel ready to release, go over to the Google Play Developer page and sign up. Pay the $25 for a lifetime account, and get ready to publish your app!
  9. Release your app through Alpha or Beta channels first - When you go to release your first app, you might feel like it is a good idea to release to production immediately. Hold your horses! If you turn on pre-launch reports (it is in the menu on the left of the Play Developer Console page, under 'Release Management') and upload the app to Alpha or Beta, the app will be briefly tested on a variety of devices. This has saved my bacon on several occasions where I forgot something simple (like switching from test ads to live ads or a weird crash that occurred from the soundpool that I didn't notice because I had sound off) and it causes crashes on the test devices. 
  10. Pop open the champagne, you have an app in the Play Store!

This is a very brief overview of the basic steps that I followed to start Android app development, but I think they might be helpful to some others that feel like they don't know where to start. Over the next few posts I will dive into some of the steps in a bit more detail, and will discuss some of the hurdles that I faced in the very beginning.

No comments:

Post a Comment