‎"Behind every stack of books there is a flood of knowledge."

Develop an Android Application


Getting Started

Welcome to Training for Android developers. Here you’ll find sets of lessons within classes that describe how to accomplish a specific task with code samples you can re-use in your app. Classes are organized into several groups you can see at the top-level of the left navigation.

This first group, Getting Started, teaches you the bare essentials for Android app development. If you’re a new Android app developer, you should complete each of these classes in order:

  1. Building Your First App

    After you’ve installed the Android SDK, start with this class to learn the basics about Android app development.

    1. Creating an Android Project
    2. Running Your Application
    3. Building a Simple User Interface
    4. Starting Another Activity
  2. Managing the Activity Lifecycle

    How Android activities live and die and how to create a seamless user experience by implementing lifecycle callback methods.

    1. Starting an Activity
    2. Pausing and Resuming an Activity
    3. Stopping and Restarting an Activity
    4. Recreating an Activity
  3. Supporting Different Devices

    How to build your app with alternative resources that provide an optimized user experience on multiple device form factors using a single APK.

    1. Supporting Different Languages
    2. Supporting Different Screens
    3. Supporting Different Platform Versions
  4. Building a Dynamic UI with Fragments

    How to build a user interface for your app that is flexible enough to present multiple UI components on large screens and a more constrained set of UI components on smaller screens—essential for building a single APK for both phones and tablets.

    1. Using the Support Library
    2. Creating a Fragment
    3. Building a Flexible UI
    4. Communicating with Other Fragments
  5. Saving Data

    How to save data on the device, whether it’s temporary files, downloaded app assets, user media, structured data, or something else.

    1. Saving Key-Value Sets
    2. Saving Files
    3. Saving Data in SQL Databases
  6. Interacting with Other Apps

    How to build a user experience that leverages other apps available on the device to perform advanced user tasks, such as capture a photo or view an address on a map.

    1. Sending the User to Another App
    2. Getting a Result from the Activity
    3. Allowing Other Apps to Start Your Activity
  7. Sharing Content

    How to take your app interaction to the next level by sharing information with other apps, receive information back, and provide a simple and scalable way to perform Share actions with user content.

    1. Sending Content to Other Apps
    2. Receiving Content from Other Apps
    3. Adding an Easy Share Action

Creative Vision


We focused the design of Android around three overarching goals, which apply to our core apps as well as the system at large. As you design apps to work with Android, consider these goals:

Enchant me

Beauty is more than skin deep. Android apps are sleek and aesthetically pleasing on multiple levels. Transitions are fast and clear; layout and typography are crisp and meaningful. App icons are works of art in their own right. Just like a well-made tool, your app should strive to combine beauty, simplicity and purpose to create a magical experience that is effortless and powerful.

Simplify my life

Android apps make life easier and are easy to understand. When people use your app for the first time, they should intuitively grasp the most important features. The design work doesn’t stop at the first use, though. Android apps remove ongoing chores like file management and syncing. Simple tasks never require complex procedures, and complex tasks are tailored to the human hand and mind. People of all ages and cultures feel firmly in control, and are never overwhelmed by too many choices or irrelevant flash.

Make me amazing

It’s not enough to make an app that is easy to use. Android apps empower people to try new things and to use apps in inventive new ways. Android lets people combine applications into new workflows through multitasking, notifications, and sharing across apps. At the same time, your app should feel personal, giving people access to superb technology with clarity and grace.

Get Started with Publishing

You can set up to start publishing on Google Play in only a few minutes. Here’s how you do it:

  • Register for a Google Play publisher account
  • If you will sell apps, set up a Google Wallet Merchant Account
  • Explore the Google Play Developer Console and learn about the tools for publishing

Register for a publisher account

The first step is to visit the Google Play Developer Console and register for a publisher account.

Here’s what you will do during registration:


  • You need a Google account to register. You can create one during the process.
  • If you are an organization, consider registering a new Google account rather than using a personal account.
  • Review the developer countries andmerchant countries where you can distribute and sell apps.
  1. Visit the Google Play Developer Console at
  2. Enter basic information about your developer identity — developer name, email address, and so on. You can modify this information later.
  3. Read and accept the Developer Distribution Agreement that applies to your country or region. Note that apps and store listings that you publish on Google Play must comply with the Developer Program Policies and US export law,
  4. Pay a $25 USD registration fee using Google Wallet. If you don’t have a Google Wallet account, you can quickly set one up during the process.

When your registration is verified, you’ll be notified at the email address you specified during registration.

Set up a Google Wallet Merchant account

If you want to sell products on Google Play — priced apps, in-app products, or subscriptions — you will also need to set up a Google Wallet Merchant Account. You can do that at any time, but make sure to first review the list of merchant countries.

To set up a Merchant account from the Developer Console:

  1. Sign in to your Google Play Developer Console at
  2. Open Financial reports  on the side navigation.
  3. Click Setup a Merchant Account now.

This takes you to the Google Wallet site to sign up as a Merchant; you’ll need information about your business available to complete this step.

Explore the Developer Console

When your registration is verified, you can sign in to your Developer Console, which will be the home for your app publishing operations and tools on Google Play.

Porting Android to Devices

Android provides you with the freedom to implement your own device specifications and the drivers to support them. The hardware abstraction layer (HAL) gives you a standard way to create software hooks in between the Android platform stack and your hardware. In addition, the Android operating system is open-sourced to help you through your device’s bringup.

To ensure that your devices maintain a high level of quality and offers a consistent experience for your users, they must must also pass the tests in the compatibility test suite (CTS). CTS ensures that anyone building a device meets a quality standard that ensures apps run reliabaly well and gives users a good experience. For more information, see the Compatibility section.

Android Low-Level System Architecture

Before you begin porting Android to your hardware, it is important to have an understanding of how Android works at a high level. Because your drivers and HAL code interact with many layers of Android code, this understanding can help you find your way through the many layers of code that are available to you through the AOSP (Android Open Source Project) source tree. The following diagram shows a system level view of how Android works:

Figure 1. Android System Architecture

Application framework

This is the level that most application developers concern themselves with. You should be aware of the APIs available to developers as many of them map 1:1 to the underlying HAL interfaces and can provide information as to how to implement your driver.

Binder IPC

The Binder Inter-Process Communication mechanism allows the application framework to cross process boundaries and call into the Android system services code. This basically allows high level framework APIs to interact with Android’s system services. At the application framework level, all of this communication is hidden from the developer and things appear to “just work.”

System services

Most of the functionality exposed through the application framework APIs must communicate with some sort of system service to access the underlying hardware. Services are divided into modular components with focused functionality such as the Window Manager, Search Service, or Notification Manager. System services are grouped into two buckets: system and media. The system services include things such as the Window or Notification Manager. The media services include all the services involved in playing and recording media.

Hardware abstraction layer (HAL)

The HAL serves as a standard interface that allows the Android system to call into the device driver layer while being agnostic about the lower-level implementations of your drivers and hardware. You must implement the corresponding HAL (and driver) for the particular piece of hardware that your product provides. Android does not mandate a standard interaction between your HAL implementation and your device drivers, so you have free reign to do what is best for your situation. However, you must abide by the contract defined in each hardware-specific HAL interface for the Android system to be able to correctly interact with your hardware. HAL implementations are typically built into shared library modules (.so files).

Linux Kernel

For the most part, developing your device drivers is the same as developing a typical Linux device driver. Android uses a specialized version of the Linux kernel with a few special additions such as wakelocks, a memory management system that is more agressive in preserving memory, the Binder IPC driver, and other features that are important for a mobile embedded platform like Android. These additions have less to do with driver development than with the system’s functionality. You can use any version of the kernel that you want as long as it supports the required features, such as the binder driver. However, we recommend using the latest version of the Android kernel. For the latest Android kernel, see Building Kernels.



One comment on “Develop an Android Application

  1. woww informative post…thanks

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Virtual Fashion Technology

Virtual Fashion Education


"chúng tôi chỉ là tôi tớ của anh em, vì Đức Kitô" (2Cr 4,5b)


News About Tech, Money and Innovation


Modern art using the GPU

Theme Showcase

Find the perfect theme for your blog.


Learn to Learn

Gocomay's Blog

Con tằm đến thác vẫn còn vương tơ

Toán cho Vật lý

Khoa Vật lý, Đại học Sư phạm Tp.HCM - ĐT :(08)-38352020 - 109

Maths 4 Physics & more...

Blog Toán Cao Cấp (M4Ps)

Bucket List Publications

Indulge- Travel, Adventure, & New Experiences


‎"Behind every stack of books there is a flood of knowledge."

The Blog

The latest news on and the WordPress community.

%d bloggers like this: