Icon
Icon
Icon
Icon
Icon
Icon

Friday, February 3, 2012

06. Overview of the Android

9:37 AM
0 comments
In this lesson we talk about Android platform. Firstly we will look at the architecture.

ANDROID ARCHITECTURE
  • Runs on top of Linux 2.6
  • Dalvik virtual machine optimized for mobile devices
  • Integrated browser based on the WebKit engine
  • Optimized graphics with OpenGL ES
  • SQLite database for structured data storage

Now let's talk about Android versions. Because android has been progressing really fast phase.
  • Android 2.0/ 2.1 Eclair 
  • Android 2.2 Froyo
  •  Android 2.3 Gingerbread
  • Android 3.0 Honeycomb (Tablet version)
  • Android 4.0 Ice Cream Sandwich (Combination of Gingerbread and Honeycomb)


APPLICATION FUNDAMENTALS
  • Applications are written in the Java programming language.
  • Compiled into an Android package file (.apk).
  • Each application runs in its own sandbox and Linux process.
  • Applications consist of components, a manifest file and resources.
  • Components :
                -    Activities
                -    Services
                -    Content providers
                -    Broadcast receivers


Activities
  •  An activity represents a single screen with a user interface.
  • Most applications contain multiple activities.
  • When a new activity starts, it is pushed onto the back stack.
                 - In the user's application, in the first screen that user sees they click something to launch in another activity. That initial activity is paused and the new activity is come to the front. If the user hit the back key, it actually show the one before activity again. This concept is back stack.
  • User interface can be built with XML or in Java.
  • Monitor lifespan through callback method like onStart(), onPause(), etc.


Services
  • Services perform long-running operations in the background.
  •  Does not contain a user interface.
  • Useful for things like network operations, playing music, etc.
  • Runs independently of the component that created.
  • Can be bound to by other application components, if allowed.

Content Providers
  • Used to store and retrieve data and make it accessible to all applications.
  • Are the only way to share data across applcations.
  • Exposes a public URI that uniquely identifies its data set.
  • Data is exposed as a simple table on a database model.
  • Android contains many providers for things like contacts, media, etc.

Broadcast Receivers
  • A component that responds to system-wide broadcast announcements.
  • Examples include when the screen turns off, the battery is low, etc.
  • Applications can be initiate their own broadcasts.
  • Broadcast receivers contain no user interface.
  • They can create status bar notifications to alert the user.


ANDROID MANIFEST FILE
  • Applications must have an AndroidManifest.xml file in its root directory.
  • Presents information about the application to the Android system.
  • Describes the components used in the application.
  • Declares the permissions required to run the application.
  • Declares the minimum Android API level that the application requires.

That is the quick overview of the Android platform.