Getting started with Android app development

I recently published my first Android app and a few friends asked me for advice on how they can get started developing their own apps. This question has been asked many times on the AndroidDev subreddit and it is commonly advised that people take the time to learn how to build native apps. This however may not be the most suitable choice for people who want to publish their app quickly or publish to non-Android app markets as well (App Store, Windows Store etc.).

The good news is there are a number ways you can develop an Android app. We can categorise these methods as:

  1. Native
  2. Web
  3. Hybrid

I will now give a brief explanation of these methods and summarise their pros and cons. 

1. Native

Native apps allow you to create the best user experience because you work directly with the Android Software Development Kit (SDK). You can use native User Interface (UI) widgets and components that have been optimised for performance. i.e. UI elements load quickly and transitions / animations are smooth. The Android SDK also provides access to the phone’s hardware. e.g. camera, accelerometer, GPS etc.

In my opinion, the best place to start learning how to build native apps would be Google’s Android developer training guides. Make the effort to download and compile example code provided in the guides to reinforce your learning. This also gives you an opportunity to play with the code as you might be writing similar code in your own app.

Additionally, you should learn and apply Android UI design patterns to your app. This allows you to provide a user experience that is consistent with other conforming Android apps. For example, the Action Bar Design Pattern was introduced in Ice Cream Sandwich (Android v15+), and it recommends placing navigation and action icons at the top of your UI. Android users are accustomed to this design and following design patterns such as the Action Bar Design Pattern allows users to intuitively use your app. Adversely, not following these patterns (e.g. placing elements in non standard locations) can confuse users by creating a unfamiliar user experience.

I would also recommend you check out open source projects that have implemented similar features to what you want in your app. This allows you to not only play with working code but also gives you a chance to review code written by others. Hopefully, you can uncover new ideas and insights on how to improve your own code / coding practices.

Building a native app is the most difficult and time consuming method as you will need to learn Java, Object Oriented Programming (OOP) and the Android SDK. In particular, dealing with component lifecycles (e.g. Activities and Fragments) can be difficult in the beginning.

I built my first app as a native app because I wanted it to have the native look and feel. I also plan to build more apps in the future so it made sense for me to take the time to learn how to build native apps.

Pros:

Cons:

2. Web

This method involves building / modifying a website so it displays a customised view for mobile devices. For example, viewing a Wikipedia article from a web browser on a mobile device will direct you to Wikipedia’s mobile webpages. Compare http://en.m.wikipedia.org/wiki/Oscar_Wilde (Mobile) to http://en.wikipedia.org/wiki/Oscar_Wilde (Normal).

This is a easy method that allows you to customise the look and feel of your website and its features for mobile device users.

Pros:

Cons:

3. Hybrid

Hybrid apps are created using a mixture of the Native and Web methods. Generally speaking, they involve building a native app with a WebView component that acts as a container. The UI and functionality of the app is then built using Web technologies and placed in the WebView container.

The benefits of this approach include a faster development time compared to Native apps (use Web technologies rather than Java, OOP and Android SDK), it can be packaged as a downloadable app unlike Web apps and certain frameworks allows you to deploy your app to different markets (Google Play, App Store, Windows Store etc.).

Two popular frameworks I am aware of are:

  1. PhoneGap: free, open source, Java
  2. Titanium AppAccelerator: paid, JavaScript

An in-depth discussion comparing these two frameworks is available on StackOverflow. The use of frameworks similar to PhoneGap may also require learning touch optimised JavaScript libraries such as JQuery Mobile.

There are many other frameworks available such as Kivy. Kivy allows you to write apps in Python but it also includes a Python runtime that will dramatically increase the size of your packaged app. A comparison of mobile development frameworks is available at http://www.markus-falk.com/mobile-frameworks-comparison-chart/.

Pros:

Cons:

Conclusion:

Your choice of method depends on your needs, available resources and programming background. Hopefully, this overview has given you a better idea of the different approaches you can take to develop an Android app. My final words of advice is to choose a method and start developing!

Other considerations: