+ All Categories
Home > Documents > Android 3448

Android 3448

Date post: 06-Apr-2018
Category:
Upload: kethu-rakesh
View: 226 times
Download: 0 times
Share this document with a friend

of 26

Transcript
  • 8/3/2019 Android 3448

    1/26

    Mandus Elfving, IBS JavaSolutions, 2009Android

  • 8/3/2019 Android 3448

    2/26

    What is Android?

    Operating system and platform for mobile devices

    Developed by Google and later by the Open Source Handset

    Alliance

    Mostly open sourced under the Apache and other open

    source licenses

  • 8/3/2019 Android 3448

    3/26

    Android features

    Integrated browser based on the open source WebKit engine

    Optimized graphics powered by a custom 2D graphics library; 3D graphics based

    on the OpenGL ES 1.0 specification (hardware acceleration optional)

    SQLite for structured data storage

    Media support for common audio, video, and still image formats (MPEG4, H.264,

    MP3, AAC, AMR, JPG, PNG, GIF)

    GSM Telephony (hardware dependent)

    Bluetooth, EDGE, 3G, and WiFi (hardware dependent)

    Camera, GPS, compass, and accelerometer (hardware dependent)

  • 8/3/2019 Android 3448

    4/26

    Architecture

  • 8/3/2019 Android 3448

    5/26

    Why is Android interesting to us?

    Application development is done in Java!

  • 8/3/2019 Android 3448

    6/26

    Dalvik Virtual Machine

    Optimized for mobile devices

    Relies on the underlying OS for process separation, memorymanagement and threading

    Designed to run multiple VM instances efficiently

    Executes its own type of byte code in files created from Javaclass files

  • 8/3/2019 Android 3448

    7/26

    Android vs. Java

    Based on Apache Harmony

    Supports most of the J2SE 5.0 library

    Applets, printing and other irrelevant stuff

    left out

    Includes third party libraries, e.g.bluetooth and JSON libraries

  • 8/3/2019 Android 3448

    8/26

  • 8/3/2019 Android 3448

    9/26

    Application building blocks

    Applications consist of components that are the entry points

    of an application

    Applications can use components from other applications

    Four types of components:

    Activities

    Services

    Broadcast receivers

    Content providers

  • 8/3/2019 Android 3448

    10/26

    Application Building Blocks con't

    Components declared in AndroidManifest.xml

  • 8/3/2019 Android 3448

    11/26

    Activities

    Interface for one of the activities that a

    user undertake in an application

    Applications are (usually) built from

    multiple activities

    The UI for an activity is built with Views

  • 8/3/2019 Android 3448

    12/26

    Services

    Used for long running background processes, e.g. media

    player

    Can run on its own in the background and/or be operated

    by an interface

    Run in the main thread of the application process

    Spawn thread to not block main thread

  • 8/3/2019 Android 3448

    13/26

    Broadcast receivers

    Components that react to system or application broadcasts

    System broadcasts for example when the battery level is low

    or the timezone changed

    Applications can initiate broadcasts that other applications

    can react to

  • 8/3/2019 Android 3448

    14/26

    Content providers

    Application data is by default private to the application

    Content providers make an applications private data available

    to other applications through a standardized API Accessed through a ContentResolver with an URI of the

    content provider to use, e.g.

    content://com.example.addressbook/contacts

    Android ships with standard content providers for common

    data types (audio, video, contacts, etc.)

  • 8/3/2019 Android 3448

    15/26

    Application navigation

    Components are activated by intents

    Intents are asynchronous messages

    Intents contain information relevant to the receiving

    component, e.g. action to take and data to act on

    Also contain information that the system use for finding thecomponent that should handle it

  • 8/3/2019 Android 3448

    16/26

    Application navigation con't

    Components can be targeted explicitly or implicitly

    Intent filters define that a component can handle a specificimplicit intents

    The system locates the best component to respond to an

    implicit intent

    Intent filters are defined in the manifest file

  • 8/3/2019 Android 3448

    17/26

    Application life cycle

    Tasks are groups of related activities

    arranged in a stack

    Tasks can be sent to the background

    or moved to the foreground

    Only one task and activity running atthe same time

  • 8/3/2019 Android 3448

    18/26

    Application life cycle con't

    When system runs low on memory applications can be killed

    All applications are placed in an importance hierarchy to

    determine which application to kill next

    Importance is based on the components running in an

    application and their state

  • 8/3/2019 Android 3448

    19/26

    Application framework

    Consists of a set of services and systems to help in

    application development

    For example used to support localized applications and to

    build the graphical UI

    Used by core applications such as the SMS and Contactsapplications

  • 8/3/2019 Android 3448

    20/26

    Views

  • 8/3/2019 Android 3448

    21/26

  • 8/3/2019 Android 3448

    22/26

    Notification manager

    Allows the application to notify the user when something has

    happened in the background

    Different kinds:

    Icon in the status bar

    LEDs on the device Flashing backlight, playing a sound or vibrating

  • 8/3/2019 Android 3448

    23/26

    Security

    Applications are signed with a certificate

    Applications run in their own process with a unique user id

    Permissions restrict access to the data on the device

    Permissions granted by user on installation of application

    Permissions that application need and declaration of custom

    permissions is done in the application manifest file

  • 8/3/2019 Android 3448

    24/26

    Development environment

    Android SDK

    Command-line tools

    Eclipse with an Android plugin

    Execution/debugging in an emulator

    running the full OS and software stack

  • 8/3/2019 Android 3448

    25/26

  • 8/3/2019 Android 3448

    26/26

    More information at:http://developer.android.com/


Recommended