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.

Thursday, February 2, 2012

05. Install ADT plugin for Eclipse

12:16 PM
0 comments
Now you have installed Eclipse. ADT plugin helps to create Android project in Eclipse. Go to the below url to download ADT.

http://developer.android.com/sdk/index.html

Current version will show under the ADT plugin for Eclipse. Click on that version and find the download link.














We actually download and install it directly to the Eclipse. We can see the repository url here. We want to copy this to the clipboard and go to the eclipse. Select the Install New Software under the Help.
Basically this is asking us to give a site which we can download the software. Here we paste that url.
Then click Add to added as a site.


It searching that site to see what is available for us to download. After it done, select the Developer tool check box to download all the files and click Next.




Then choose options accordingly below screenshots.


























After the installation, restart the Eclipse. You should see the below Android commands in the tool bar.



Here we can open the Android SDK manager, create a new Android project, create a test project and create new android xml file.
We need to tell eclipse where are android SDK is. It will show an error when you click on the SDK manager button. To setup the SDK manager to eclipse, click Window button and select Preferences .
Then click on Android and Browse SDK installation folder for SDK Location.

 





















Now you can access the Android SDK manager clicking that button.
So with that you successfully downloaded and installed the Android Gingerbread SDK to Eclipse. And you have android development tool. Now you have officially ready to get started with android development.

Wednesday, February 1, 2012

04. Download a developing tool (Eclipse)

10:20 AM
0 comments
Here we use Eclipse as our developer tool. You can download it with following url.

http://www.eclipse.org





Click this download link and choose any suitable version.







Here we choose to download Eclipse IDE for Java Developer version. 













No need to install Eclipse after the download. You should only run the eclipse.exe file.













It's better to create a shortcut in the desktop.