Android Development 101

The Android Platform

  • A software stack for mobile devices

    • OS kernel, system libraries, application
      frameworks & key apps
  • Android SDK for creating apps

    • Libraries & development tools

Linux Kernel

  • Standard Services

    • Security, Memory & process management, File & network I/O, Device drivers
  • Android Specific

    • Power management, Android shared memory, Low memory killer, Interprocess communication & More

Libraries

  • System C Library

  • Web Kit

  • Surface Manager

  • OpenGL

  • Media Framework

  • SQLite

Android Runtime

  • Core Java libraries

  • Dalvik Virtual Machine

Application Framework

  • Package Manager

  • Window Manager

  • View System

  • Resource Manager

  • Activity Manager

  • Content Provider

  • Location Manager

  • Notification Manager

Applications

  • Home – main screen
  • Contacts – contacts database
  • Phone – dial phone numbers
  • Browser – view web pages
  • Email reader –compose & read email messages
  • And more...

The Android Development Environment

  • ADT Bundle
  • Android Studio
  • Android Emulator
  • Debugger
  • DDMS

Application Components

  • Activity

  • Service

  • Broadcastreceiver

  • Contentprovider

Activity

  • Primary class for user interaction
  • Usually implements a single, focused
    task that the user can do

Service

  • Runs in the background
  • To perform long-running operations
  • To support interaction with remote
    processes

BroadcastReceiver

  • Component that listens for and responds to
    events
  • Events represented by the Intent class
    and then Broadcast
  • BroadcastReceiver receives and
    responds to broadcast event

Content Providers

  • Store & share data across applications
  • Uses database-style interface
  • Handles interprocess communication

Creating An Android App

  1. Define resources

  2. Implement application classes

  3. Package application

  4. Install & run application

Defining Resources

  • Resources are non-source code entities

  • Many different resource types, such as
    Layout, Strings, Images, Menus, & animations

  • Allows apps to be customized for
    different devices and users

Implement Classes

  • Usually involves at least one Activity

  • Activity initialization code usually resides in onCreate()

Package Application

  • System packages application components & resources into a .apk file

  • Developers specify required application information in a file called AndroidManifest.xml

Install & Run

  • From IDE run in the emulator or
    device

  • From command line (ADB)

Resources

Sumon M. Selim

Software Engineer, P1

@SumonMSelim

Made with Slides.com