syllabus

Android Development

Introduction

1Introduction

In today’s world it would be hard to find someone who hasn’t heard of android. Do you have a killer app idea that you think is going to change the world? With around 2 billion monthly users worldwide it is an interesting and one of the major platform to develop apps for.

As this chart points out, it is a lucrative career choice even if you are working for somebody. Source.

No Resources

Check the other sections in this syllabus to find more resources!

Prerequisites

2Prerequisites

Core Java

Java is the primary language used for developing android apps. Core java concepts should be very clear before diving into android development. Concepts like method overriding, inheritance, interfaces, and anonymous inner classes are commonly used in android development.

XML

XML or extensible markup language is used mostly to define UI layouts for android apps. It is also used to define some drawable shapes and menu items. Basic knowledge of XML is sufficient. W3Schools has a good reference guide.

Setting Up First App

5Setting Up First App

IDE

An IDE or Integrated Development Environment is a software to run and execute your code. It has a lot of features which make development faster like code completion, organizing your project, searching for resources in your project, debugging your code etc. It can also be extended by installing plugins. For example, there is a plugin called key promoter which helps you learn keyboard shortcuts for the IDE by showing a modal window with the shortcut when you do an action/sequence of actions 3 times via mouse. For Android development the de facto IDE is Android Studio. It used to be eclipse previously but Google is not supporting it anymore. Android studio is a customized version of Intellij Idea by Jetbrains . Below is a photo of the Android Studio interface.

Android Studio interface
Android SDK

Android SDK (software development kit) is the set of libraries and resources (documentation, images, emulator etc ) that are required for development of application. A library is a collection of useful code which can be shared across easily. Imagine someone has written some code to perform some mathematical calculation. If they want to share their code to others, the easiest way would be to bundle it as a library and share.Android SDK comes bundled with android studio but can be downloaded separately and configured along.

Project Configuration, Screens & Basic Layouts

16Project Configuration, Screens & Basic Layouts

Android Studio Sections

Now that we have setup Android Studio and ran our first app, we need to understand different components of the project and different sections of Android Studio.

The “Meet Android Studio” in the Android Studio documentation resource link below explains the different sections/windows and components of Android Studio very well. Also I have given an excerpt from it for an overview.

More UI Components, User Interaction & Screen Navigation

10More UI Components, User Interaction & Screen Navigation

Aggregate UI components

Simple UI components/widgets like TextView, Buttons, Radio Buttons etc can only display limited amount of UI at a time. For example if you want to display a scrolling list of text, you can’t create 10 or 100 different TextViews in your layout. In these cases you need UI components that can show aggregate data.

There are different UI views that can show aggregate data in android like

Using Dialogs & Saving Data

7Using Dialogs & Saving Data

Dialogs

Dialogs (sometimes called modal windows) are used when there is immediate interaction needed with the user. The dialogs stop the user’s interaction from any other UI component till any action is taken on it. Most of the times they are used to alert user of something/get confirmation or used to get input without which the app cannot proceed further. An example would be a “Discard draft?” popup message.

Android Modal Window example
Saving data

For a good user experience we need to save regularly needed user data in our app. For e.g. Facebook app saves your login info so that you don’t have to login every time when you open their app.

Location & Maps

5Location & Maps

Location

Almost all the Android phones have an ability to get your current location. A lot of apps use this feature to give a better user experience. For e.g. navigation apps like Google maps use your location information to help you navigate from one location to another. Dating apps use this feature to find other users near you. As an android developer it is important to know how to access user location so that it could be used to give them a better experience or integrate with your service.

Maps

I believe that mapping technology along with gps has revolutionised travel. Google maps provide you with navigation, mapping, live traffic etc. As a developer you can leverage these services google provides in your own application. Google provides services for geocoding (converting location into an address) maps, navigation etc. to developers as well.

Loading Websites

3Loading Websites

Loading Websites

Android SDK has a nifty configurable UI widget where in you can load websites within the app itself. The widget is called WebView. WebView is a UI widget just like any other UI view (Button/ TextView etc.) which can be placed or sized however you want in your layout. It is like an embedded mini browser in your app that can load any website you want

Connecting to the Internet

Perhaps the most frequent architecture that a lot of companies follow is that they have a web service and use an app/website as a front end. Take an example of taxi app like Uber. They have an app for making booking, payments, cancellations etc. and a backend web service which facilitates all of this. The app programmatically connects to their web service through the internet and exchanges data to and fro as required.

Uploading To Google Play Store

4Uploading To Google Play Store

Google Developer Account

So once you have created your own app, how would people get it or how would they buy it? You would need to upload your app onto Google Play Store. Google play store is a marketplace for android apps. Almost all of the android phones have it preinstalled from where they can download and install app.

To be able to upload apps on the play store, you need to have a developer account. It is a paid account and it costs 25$ as a onetime fee.

Tips, Best Practices, Libraries & Community

5Tips, Best Practices, Libraries & Community

Tips

There are a lot of tips for beginners in Android development. Not all of them will be applicable for you. Honestly it takes practice and trying out a lot of different things to see what works for you and what does not. Here is a good article with a list of some great tips and tricks.

Best Practices

As a developer/designer, there are some of the best practices and guidelines that you can follow to make your app look good, or make it faster. Again, it depends upon you what to follow and what not.

Indraneel Potnis
MENTOR
I'm a software programmer who has worked with a variety of technologies like Wordpress, J2EE, Android, Game development. I've published a book on game development with packt publications and a card game on Google Play store! My hobbies are trekking, reading and stargazing (and.. a TV series addict). BMC logoBuy me a coffee