Pages

Tuesday, September 25, 2012

Unknown Facts

Android Unknown Facts:

If you thought Android was the brainchild of Google, think again. It was devised way back in 2003 by Andy Rubin and Rich Miner only to sell it to Google for $50 million. Google put the concept in cold storage until 2007 when it announced plans to launch the Android mobile platform. Today Rubin is the director of mobile platforms and Miner the group manager, both at Google.

AndroidManifest.xml

The AndroidManifest.xml File :

 Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest presents essential information about the application to the Android system, information the system must have before it can run any of the application's code. Among other things, the manifest does the following:
  • It names the Java package for the application. The package name serves as a unique identifier for the application.
  • It describes the components of the application — the activities, services, broadcast receivers, and content providers that the application is composed of. It names the classes that implement each of the components and publishes their capabilities (for example, which Intent messages they can handle). These declarations let the Android system know what the components are and under what conditions they can be launched.
  • It determines which processes will host application components.
  • It declares which permissions the application must have in order to access protected parts of the API and interact with other applications.
  • It also declares the permissions that others are required to have in order to interact with the application's components.
  • It lists the Instrumentation classes that provide profiling and other information as the application is running. These declarations are present in the manifest only while the application is being developed and tested; they're removed before the application is published.
  • It declares the minimum level of the Android API that the application requires.
  • It lists the libraries that the application must be linked against.

Unknown Facts

Android Unknown Facts

Android is the latest mobile OS to hit the market with lots of amazing features and promoted by a group of more than 30 renowned companies led by no less than Google itself. Still are you aware of all the Android facts other than its cute logo and geek name, probably not. So here we bring out the lesser-known Android facts that are sure to catch your interest in this superb mobile platform.
5 Things You Never Knew About Android:
  1. If you thought Android was the brainchild of Google, think again. It was devised way back in 2003 by Andy Rubin and Rich Miner only to sell it to Google for $50 million. Google put the concept in cold storage until 2007 when it announced plans to launch the Android mobile platform. Today Rubin is the director of mobile platforms and Miner the group manager, both at Google.
     
  2. Android is based on Linux, the open source operating system and Windows challenger. And if anything challenges Microsoft it interests Google. Apart from this keeping Android source code open means many developers will be attracted to the development environ and will also help to keep the costs down and revenues high.
      
  3. While the iPhone can only run one app at a time the Android is a proper multi-tasking mobile OS that can run multiple apps like the Google Maps, media player, browser at the same time without any hiccups. Seems like iPhone has some catching up to do at least in one department.
      
  4. Will Android be completely open as previously thought? It seems not and a good reason for saying this is the fact that the complete Android code hasn't been disclosed to the developer community and it is likely that Google will not disclose the crux of the Android code for reasons best known to it. Be ready for less than full Android development then.
       
  5. You must be wondering hoe does Google benefit from keeping the Android platform open source especially when it doesn't take a dime from the application distributed through the online Android Market. Well Google the old hat wants to dominate the mobile advertising space just like it has dominated the PC web space. So don't be surprised if you see a pop up every now and then while browsing on your Android phone, after all Google doesn't collect the huge chunk of your personal browsing data for nothing, does it?

Sunday, September 23, 2012

Files in an android application

Now its time to get the knowledge about all the files in an android application which build automatically while making a android project.


when we create a android project a number of files are built in the project these files are........
1.) src -: this file is the functional file of any project which is based on the java language.here we create the java file for the specific purpose and code them according to our need.
2.) gen -: this file is the auto generated and auto modifiable file. this file should not be modified.this file contains a java file named R.java which contains all the registry about the projects like the GUI items like buttons, images etc.
3.) android library -: this is the library file need not to do anything with it. creation of this file is depended on the android target you used while making a new project.
4.) assets -: this files contains the extra material or stuffs like fonts ,colors etc.
5.) bin -: in this file the executable file been saved which is executable in android platform the extention of this file is "application name.apk".
6.) res -: here the designing part is being coded. Means the GUI is made in this file.this file has some more sub files which are.
    a.) drawable-hdpi-: containa the images with high quality
    b.) drawable-mdpi-: containa the images with medium quality
    c.) drawable-ldpi-: containa the images with low quality
    d.) layouts-: layouts are the graphical interface desined for application which is made for user
          to interact with application
    e.) values-: it contains the strings which we write anywhere in our application.
7.) AndroidManifest.xml -: this file is responsible for the services which we used in the android device like the camera,flash,vibrate etc. all the java files must be declared in this file to make them execute normally and successfully.
8.) proguard.cfg -: this file is auto generated and keep the java and android services. Need not to do anything with it.
9.) project.properties -: properties file of the project auto modifiable dont touch until get any error.

Thursday, September 13, 2012

Eclipse and SDK Downloading links

LINKS for Eclipse and SDK...

 Hey I forgot to give the links to download Eclipse and SDK...........
Here is the links.
Eclipse : www.eclipse.org/downloads/index.php
SDK : https://developer.palm.com/content/resources/develop/sdk_pdk_download.html

Dont forget that you have to install the java jdk on your System...

Monday, September 10, 2012

First Andoid Application.

In my first post I have posted how to install android platform.



Now lets move towards the first andoid application.
We will start with a simple android application which will show a screen printed "Hello World, AndroidActivity!".
Now open file in file open new android project.
once you click in new android project the screen will open like it rest i will tell in the screens.



when you click on next a window will open in which you have to write the desired application name then the package name  basically package name is devided into three parts and seperated with the dots(.) where the your is written in the window place com there then any desired text like your name ,company name then after . and then the application name.
suppose i am making a new project with name hello and my name is nik and application name is AndroiD. then i will ceate package like "com.nik.AndroiD".
then the activity which is a default auto generated class name whatever you want and the minimum sdk version will be placed there automatically according to what target you have selected for the project.

and click on Finish button.
On clicking finish you will see a window in which you have a project named hello just explore that project and you will see various folders and files.i am showing you below.


When you see these files then time to check that if the applcation is running or not.
First make a simulator means virtual platform to run the applications for that click on window then AVD manager.


In AVD manager you will see the window where you have to create a Enumelator


give a name to avd and select target according to project target.then click on create avd.

Once you have created the AVD you have to run the application
for that just right click on the hello project then go to "Run As" and click on the Run Configurations....


now you will see the window like below.



1.click on Android Application
2.click on Target
3.click on checkbox which enumelator you want to launch
4.click on run.
after clicking on run a enumeltor will open like below.

dont make any change in the application till the enumelator starts.Once it starts it will look like an android mobile on your system.




Simply unlock it and here is the output of the Application.





later i will tell about each file and folder of the project in brief.



Starting with Android.

Android Tutorial:


           For android development first you need an GUI interface to code because for an android project all the files should have to be in its proper place to create a android executable file (.apk file).

So for developing you have to download the ECLIPSE ,the latest version of eclipse will be good.Eclipse will be of size approximate 300-400MB.

and you have to download the sdk kit to make support to android.This will of size approx 2-3GB

eclipse an sdk will be in a zip file you only have to extract it on your desired location need not to install it.

You can download it from these links.

 Once you have extract it and will run the eclipse it will look like the pic below.

 The green bar shows the progress of opening the eclipse. After the progress complete a window will open like this.


The links on welcome like screen OVERVIEW, SAMPLE, TUTORIAL will be tough to understand if you don't have any knowledge about android. you just have to click on the link Workspace which is circled in the above window.

After opening Workbench you will see a window divided in several parts.

 After opening the workspace click on windows then click on preference.

After clicking on preference you will see the following window. and click on android and then click on browse.


after clicking on browse a popup window will open and from there select the path of the sdk where you have extracted the sdk. finally press ok.


Now you are ready to make Android Application.