Friday, 23 May 2014

Getting Started with Android

Nick here. So here's a post to start the flow. I'll be talking about how to begin creating apps for Android.

To start developing on Android, the first thing you need to do is to visit the Getting Started page on the Android Developers' website. There, you can find tutorials on the very basics, to some slightly more advanced material. There is also a link to download the Android SDK, which very nicely comes with the Eclipse IDE. Their version of Eclipse has all the needed plugins already pre-installed, and what more, it is portable! This means you can basically start writing code on Eclipse from the get-go with very minimal setup. However, to fully utilise the Android functionality, you need to download some additional Android files. This is handled quite well by the Android SDK Manager found under the Window tab on the taskbar.

The SDK offers two ways that you can run your own Android apps. You can either plug in your Android phone to your machine, or you could run an Android emulator on your machine itself. I personally prefer to use my phone as the running platform. The emulator runs pretty slow on my PC, and it doesn't have the same feel as a touchscreen interface. To use your phone as the running platform, however, you need to unlock the developer mode. Under Settings -> More -> About Device, find the item that states the Build Number, and tap it rapidly for about ten seconds straight. Eventually, a toast notification will pop up, telling you that you have unlocked the Developer Mode. Now under Settings -> More, a new item called Developer Options will appear. Navigate into it and mark the box that corresponds to USB Debugging. This allows Eclipse to work hand-in-hand with your phone while running your application. Any errors encountered will be passed back to Eclipse and shown on the error log output.
Word of warning: do not mess around with other settings in the developer options menu unless you know what you are doing. This menu was locked for a reason!

I am not experienced enough to give a good "getting started" tutorial right now, so I won't waste our time in trying to do so. Android's own tutorial for building your first app is pretty decent in getting most people started. However it might still take some independent learning, exploring, and experimenting to be fully comfortable with the concepts covered. When I started learning, I had no time limit to meet, hence I was able to learn at my own pace. Google and StackOverflow were extremely helpful when I encountered difficulties. If you have the luxury of time, I really do recommend independent learning. For me, nothing beats the satisfaction of solving problems and finding solutions by myself.

Alright, so that's the end of the post. As I said, this post is on how to begin developing for Android. I doubt it would actually help anyone, lol, but it was quite a fun experience writing this anyway.

Time logging: I probably took about 8 hours just to complete the first tutorial, including download and setup time.

Thanks for reading!
Nicholas