Monday 29 December 2014

What are the Exceptions occurs while using HTTP services ?

Dealing with Exceptions is part of any program,bur software that makes use of external services
(such as HTTP services) must pay additional attention to exceptions because the potential for
errors is magnified.

There are several types of exceptions that you can expect while making use of HTTP services.
- Transport Exceptions
- Protocol Exceptions
- Timeouts.

You should understand when these exceptions could occur.

* Transport Exceptions can occur due to no. of reasons,but the most likely scenario with a mobile
device is poor network connectivity.

* Protocol Exceptions at the HTTP protocol layer.These include authentication errors,invalid cookies, and so on.

* Timeouts,with respect to HTTP calls,come in two flavors :
- Connection Timeouts.
- Socket Timeouts.

* A Connection Timeout can occur if the HttpClient is not able to connect to the HTTP server.

* A Socket Timeout can occur if the HttpClient fails to recieve a response within a defined time period.

Sunday 28 December 2014

What about SOAP Services ?

There are lots of SOAP-based web services on the internet,but to date Google has not provided direct
support in Android for calling SOAP web services.

Google instead prefers REST-like web services,seemingly to reduce the amount  of computing required on the client device.

However,the tradeoff is that the developer must do more work to send data and to parse the returned
data.

Some developers have used the kSOAP2 developer kit to build SOAP clients for Android.

One approach that's been used successfully is to implement your own services on the internet,which can talk SOAP ( or whatever ) to the destination service.Then your Android application only needs
to talk to your services,and you have complete control .

If the destination services change,you might be able to handle that without having to update and
release a new version of your application.You'd only have to update the services on your server.

A side benefit of this approach is that you could more easily implement a paid subscription model
for your application .If a user lets their subscription lapse , you can turn them off at your server.


Friday 26 December 2014

How to use the HttpClient for HTTP POST Requests ?

Making an HTTP POST call is very similar to making an HTTP GET call.

HttpClient client = new DefaultHttpClient();
HttpPost request = new HttpPost("your URL");
List<NameValuePair> postParameters = new ArrayList<NameValuePair>();
postParameters.add(new BasicNameValuePair("first","param value one"));
postParameters.add(new BasicNameValuePair("username","dave"));
UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(postParameters);
request.setEntity(formEntity);
HttpResponse response = client.execute(request);

- We create an HttpClient and then instatntiate the HttpPost with the URL of the HTTP endpoint.
- Next we create a list of NameValuePair objects and populated it with several name/value parameters.
- We then create a UrlEncodedFormEntity instance,passing the list of NameValuePair objects to its
constructor.
- Finally,we called the setEntity() method of the POST request and then executed the request using the HttpClient instance.

* HTTP POST supports another request-body format known as a multipart POST.With this type of
POST ,you can send name / value parameters as before,along with arbitrary files.

* To do multipart POST calls,you need to get three additional Apache open source projects :
i)- Apache Commons IO.
ii)- Mime4j
iii)- HttpMime.

 


Wednesday 24 December 2014

How to use the HttpClient for HTTP GET Requests ?

Here's one of the general patterns for using the HttpClient  :

1- Create an HttpClient (or get an existing reference).

2- Instantiate a new HTTP method , such as PostMethod or GetMethod.

3- Set HTTP parameter names/values.

4- Execute the HTTP call using the HttpClient.

5- Process the HTTP response.

* You will need to add android.permission.INTERNET to your manifest file when making HTTP
calls using the HttpClient.


Tuesday 23 December 2014

How to build and consume Services in Android ?

The Android Platform provides a complete software stack. This means you get an operating system
and middleware,as well as working applications (such as a phone dialer).

Alongside all of this,you have an SDK that you can use to write applications for the platform.

Thus far,we've seen that we can build applications that directly interact with the user through
a user interface.We have not , however , discussed background services or the possibilities of
building components that run in the background.

It includes HTTP services,background tasks and interprocess communication.

What are the Steps to Implement Search View on ActionBar ?

A Search View widget is a search box that fits between your tabs and the menu icons in the
action bar.

You need to do the following to use search in your action bar :

1- Define a menu item pointing to a search view provided by the SDK.You also need an activity into
which you can load this menu.This is often called the search invoker activity.

2- Create another activity that can take the query from the search view in step 1 and provide results.
This is often called the search results activity.

3- Create an XML file that allows you to customize the search view widget.This file is often called
searchable.xml and resides in the res / xml subdirectory.

4- Declare the search results activity in the manifest file.This definition needs to point to the XML file defined in step 3.

5- In your menu setup for the search invoker activity,indicate that the search view needs to target
the search results activity from step 2.

Monday 22 December 2014

What are you learn about an ActionBar .

You learn the following about an ActionBar :

* An ActionBar is owned by an Activity and follows its life cycle.

* An ActionBar can take one of the three forms:
i)- Tabbed ActionBar.
ii)- List ActionBar.
iii)- Standard ActionBar.

you see how these various action bars looks and behave in each of the modes.

* You learn how tabbed listeners allow you to interact with a tabbed action bar.

* You see how spinner adapters and list listeners are used to interact with the list action bar.

* You learn how the Home icon of an action bar interacts with the menu infrastructure.

* You see how icon menu items can be shown and reacted to on the action bar real estate.

* You see how to place a custom search widget in the action bar.

- You explore these concepts by planning three different activities.Each Activity supports an
action bar in a different mode.This gives you an opportunity to examine the behaviour of the
action bar in each mode. 

Friday 19 December 2014

About ActionBar in Android.

- ActionBar was introduced in the Android 3.0 SDK for tablets and is now available for phones as
well in 4.0 and above.

- It allows you to customize the title bar of an activity.

- Prior to the 3.0 SDK release,the title bar of an activity merely contained the title of an activity.

- Android ActionBar is modeled similar to the menu/title bar of a web browser.

- The 3.0 SDK is optimized and available only for tablets.

- This means the action bar API is not available for phones that run Android versions prior to 4.0

- With the 4.0 SDK,the phone and tablet aspects of the SDK are merged to provide a uniform API.

- A key goal of the action bar design is to make the frequently used actions easily available to the
user without searching through option menus or context menus.

Gravity Sensors in Android.

- Android 2.3 introduced the Gravity sensor.

- This isn't really a separate piece of hardware.It's a virtual sensor based on the accelerometers.

- In fact, this sensor uses logic similar to accelerometers to produce the gravity component of the forces acting on a device.

- The virtual sensor will take advantage of other hardware such as a gyroscope to help it
calculate gravity more accurately.

- The values array for this sensor reports gravity just like the accelerometer sensor reports its values. 

Thursday 18 December 2014

Orientation Sensors in Android .

* We avoided talking about orientation sensors until now because they were deprecated as of  Android 2.2 and you're not supposed to use them anymore. However,this sensor is very easy to use.

* The Orientation Sensor is actually a combination of the magnetic field and accelerometers sensors
at the driver level of Android.

* In other words,there is no extra hardware for the orientation sensor,but within the Android OS, there is code to expose these two sensors as if they were another sensor for orientation.

Monday 15 December 2014

Using Accelerometers and Magnetic Field Sensor Together.

- The SensorManager provides some methods that allow us to combine the compass sensor and accelerometers to figure out orientation.

- You can't use just the compass sensor alone to do the job.So SensorManager provides a method
called getRoatationMatrix(),which takes the values from the accelerometers and from the compass
and returns a matrix that can be used to determine orientation.

- Another SensorManager method,getOrientation(), takes the rotation matrix from the previous step
and gives an orientation matrix.

- The values from the orientation matrix tell us our device's rotation to the Earth's Magnetic north,
as well asthe device's pitch and roll relative to the ground.

Sunday 14 December 2014

What are the effects of Magnetic Field Sensor in Android ?

- The Magnetic Field Sensor measures the ambient magnetic field in the x,y,z axis.

- This Coordinate System is aligned just like the accelerometers sensors.

- The Unit of Magnetic Field Sensor are microteslas(uT).

- This Sensor can detect the Earth's Magnetic Field and therefore tell us where north is.

- This Sensor is also referred to as the compass,and in fact the <uses-feature> tag uses
android.hardware.sensor.compass as the name of this Sensor.

- Because the sensor is so tiny and sensitive,it can be affected by magnetic fields generated
by things near the device,and even to some extent to components within the device.

- Therefore the accuracy of the magnetic field sensor may at times be suspect.

Accelerometers Sensors in Android.

* Accelerometers are probably the most interesting of the sensors on a device.

* Using these sensors, our application can determine the physical orientation of the device in space relative to gravity's pull straight down,plus be aware of forces pushing on the device.

* Providing this information allows an application to do all sorts of interesting things,from game play
to augmented reality and of course,the accelerometers tell Android when to switch the orientation
of the user interface from portrait to landscape back again.

The Accelerometer coordinate system works like this :

* The accelerometer's x-axis originates in the bottom-left corner of the device and goes across
the bottom to the right.

* The y-axis also originates in the bottom-left corner and goes up along the left of the display.

* The z-axis originates in the bottom-left corner and goes up in space away from the device.

Friday 12 December 2014

What is Gyroscope Sensors in Android, and How it is combined with Accelerometer Sensors ?

* Gyroscopes are very cool components that can measure the twist of a device about a reference
   frame.It measures the rate of rotation about an axis.

* When the device is not rotating,the sensor values will be zeroes and when there is rotation in
   any direction,you'll get non-zero values from the gyroscope.

* A gyroscope can't tell you everything you need to know, and unfortunately errors creep in over
   time with gyroscopes.But coupled with accelerometers,you can determine the path of movement
   of the device.

Combined with Accelerometer Sensor:

   Kalman filters can be used to link data from the two sensors together.Accelerometers are not
   terribly accurate in the short term,and gyroscope are not very accurate in the long term,so
   combined they can be reasonably accurate all the time.While Kalman filters are very complex,
   there is an alternative called Complementry filters that are easier to implement in code and
   produces results that are pretty good.

* The gyroscope sensor returns three values in the values array for the x,y and z axis.
  
* The units are radians per second,and the values represent the rate of rotation around each of
   those axis.

* One way to work with these values is to integrate them over time to calculate an angle change.
   This is a similar calculation to integrating linear speed over time to calculate distance.

Thursday 11 December 2014

Pressure Sensor in Android.

* This Sensor measures barometric pressure,which could detect altitute for example or be used for
weather predictions.

* This sensor should not be confused with the ability of a touchscreen to generate
a MotionEvent with a pressure(The pressure of the touch).

* Touchscreen pressure sensing doesn't use the Android sensor framework.

* The unit of measurement for a pressure sensor is atmospheric pressure in hPa(millibar) and this
measurement is delivered in values[0].

Wednesday 10 December 2014

Temperature Sensors in Android.

* The old temperature sensor provided a temperature reading and also returned just a single value
in values[0].This sensor usually read an internal temperature,such as at the battery.

* There is a new temperature sensor called TYPE_AMBIENT_TEMPERATURE.The new value
represents the temperature outside the device in degrees Celsius.

* The placement of the temperature sensor is device dependent,and it is possible that the temperature
readings could be impacted by the heat generated by the device itself.

Tuesday 9 December 2014

Using the Media API's.

Android supports playing audio and video under the android.media package.

At the heart of the android.media package is the android.media.MediaPlayer class.
The MediaPlayer class is responsible for playing both audio and video content.The content for
this class can come from the following sources:

* Web: You can play content from the web via a URL.

* .apk file: You can play content that is packaged as part of your .apk file. You can package the media
content as a resource or as an asset ( with the assets folder ).

* SD card: You can play content that resides on the device's SD card.

The MediaPlayer is capable of decoding quite a few different content formats,including 3rd Generation
Partnership Project(3GPP, .3gp),MP3(.mp3),MIDI(.mid and others),Ogg Vorbis(.ogg),PCM/WAVE
(.wav), and MPEG-4(.mp4),RTSP,HTTP/HTTPS live streaming, and M3U playlists are also supported,

For a complete list of supported media formats,go to

http://developer.android.com/guide/appendix/media-formats.html


Proximity Sensors in Android .

* The Proximity Sensors either measures the distance that some object is from the device ( in

centimeters ) or represents a flag to say whether an object is close or far.

* The Proximity sensor is sometimes the same hardware as the light sensor.

* The Proximity is often used in the phone application to detect the presence of a person's head

next to the device.If the head is that close to the touchscreen,the touchscreen is disabled so no

keys will be accidently pressed by the ear or cheek while the person is talking on the phone.


Sunday 7 December 2014

Light Sensors in Android .

The Light Sensor is one of the simplest sensors on a device. This sensor gives a reading of the

light level detected by the light sensor of the device. As the light level changes,the sensors

readings change. The units of the data are in SI lux units.

For the values array in the SensorEvent object, a light sensor uses just the first element values[0].

This value is a float and ranges technically from 0 to the maximum value for the particular sensor.

We say technically because the sensor may only send very small values when there's no light,and

never actually send a value of 0.

For Example:

SensorManager has a constant called LIGHT_SUNLIGHT_MAX, which is float value of 120,000.

Friday 5 December 2014

Interpreting Sensor Data.

We Understand how to get data from a sensor,we must do something meaningful with the data.

The data we get, however , will depend on which sensor we're getting the data from. Some

sensors are simpler than others. As new devices come into being,new sensors will undoubtedly

be introduced as well.the sensors framework is very likely to remain the same.


Thursday 4 December 2014

What can we know about a Sensor ?

While using the uses-feature tags in the manifest file lets you know that a Sensor your

application requires exists on a device,it doesn't tell you everything you may want to

know about the actual sensor.


Detecting Sensor:

If your application needs a Proximity Sensor,you specify that in your manifest file

Ex:

<uses-feature android:name="android.hardware.sensor.proximity" />

Wednesday 3 December 2014

What is a Sensor in Android ?

A Sensor is a piece of Hardware that has been wired into device to feed data from the physical

world to applications. Applications use the sensor data to inform the user about the physical world,

to control game play,to do augmented reality,or to provide useful tools for working in the real world.

Some of the Sensor types that can appear in an Android device :

- Light Sensor.
- Proximity Sensor.
- Temperature Sensor
- Pressure Sensor
- Gyroscope Sensor
- Accelerometer
- Magnetic Field Sensor
- Orientation Sensor
- Gravity Sensor
- Linear Acceleration Sensor
- Rotation Vector Sensor
- Relative Humidity Sensor
- Near Field Communication ( NFC ) Sensor.

Monday 1 December 2014

ViewGroups in Android .

ViewGroups are Views that contain child Views.

Each ViewGroup class embodies a different set of assumptions about how to display its child views.

All ViewGroup descend from the android.view.ViewGroup class.

Subset of ViewGroups are:

- Gallery and GridView.
- ListView and ListActivity.
- ScrollView
- TabHost
etc.

Sunday 30 November 2014

What is Fragment ?

* Fragment is a small part of Activity.

* Split the Activity into SubActivity called Fragment that fits into an Activity ( Ex. Tablet ).

* Fragment can have its Layout means Activity contains more than xml.

* Fragment mostly used in Tablet not in Cellphone.

* This Feature starts from HoneyComb ( 3.0 ).

Thursday 27 November 2014

What is Sticky Intent in Android ?

* When we have to live the intent, object of intent is live called Sticky-Intent.

* Generally OS use it at the situation where we have to broadcast everytime.

* We have not create everytime object of intent by the use of Sticky-Intent.

* Example: BatteryChanged , LocationChanged.

* For this we have not used any permission.

* It is only a feature i.e managed by OS.



BroadCast Reciever in Android

* A Broadcast Reciever is another component in Android process,along with activities,content provider and Services.

* It is a component that can respond to a broadcast message sent by a client.

* The message itself is an Android broadcast intent.A broadcast intent ( message ) can invoke more than one reciever.

* A component such as an activity or a service uses the sendBroadcast() method available on the
Context class to send a broadcast event.

* Receiving components of the broadcast intent will need to inherit from a receiver class.

* These receiving components need to be registered in the manifest file through a receiver tag to
indicate that the class is interested in responding to a certain type of broadcast intent.



Wednesday 26 November 2014

What is Intent Resolution ?

To resolute intent Action , Data and Category are used for Implicit and Component is used for
Explicit intent.

Resolution of Explicit Intent :-

Explicit intent can be resolved by Component name by creating an Object of required Class from
required Package.

Resolution of Implicit Intent:-

* To start a component with Implicit Intent it has to be registered with intent-filter.

* Intent-filter filters intent based on following criteria:-

i)- If action / category / data is missing nothing will be checked.

ii)- If category is set to default it will not be checked.

iii)- If intents action / category / data is not matching with intent-filters action / category / data ,
the intent is discarded.

iv)- if all parameters matches object of component is created and launched.


Tuesday 25 November 2014

Fields of Intent in Android.

1- Component:

i)- It specifies the component to be started.
ii)- It can be set to class or fully qualified class name.

2- Context:

It is the context in which intent will be created.

i)- For Activity: Context is " this ".
ii)- For Content Provider : Context is getContext().
iii)- For Service : Context is getApplicationContext().
iv)- For Broadcast Reciever : Context will be passed as a parameter to onRecieve() method.

3- Action:

It is a String Constant which defines unique action performed by the intent ( unique by its package name ).

4- Category:

i)- It is more information about an action.
ii)- By default category is set to "android.intent.category.DEFAULT".

5- Data:

It is type of URI that supported in the component.

Example: 

Browser supports " http " URI , Telephone supports " tel " URI.
 
* Context and Component are used for Explicit Intent and Remaining feilds are used for Implicit intent.

Monday 24 November 2014

What is an Intent in Android ?

Intent is an intention to perform an operation.

It is used for-

1- To Start Component:

i)- Activity -> StartActivity and StartActivityforResult.

ii)- Service -> bindService / StartService

iii)- BroadCastReciever -> context.sendBroadcast

2- To Transfer data from one component to another ( Custom objects can be transfered by implementing parcelable or searilizable interfaces ).

3- Types of Intents:-

 i) Explicit Intent->

It is an Intent which contains explicit info. about component which will be started using the intent.

For Example:-

a)- Intent intent = new Intent( this , TestActivity.class );

b)- Intent intent = new Intent();
intent.setClassName( "packagename", fully qualified class name );

ii) Implicit Intent->

It is an Intent which doesn't specify component info. explicitly,but "Action" is used to find the component.

For Example:-

a)- Intent intent =  new Intent("Action");

b)- Intent intent = new Intent();
intent.setAction("action"); 


Friday 21 November 2014

What is Service and its types in Android ?

1- Service is a component which doesn't have any UI.

2- It runs in Background.

3- It can Update UI elements ( UI elements of the application which is currently using the service ).

4- Services allow to share functionality among applications without creating physical copy of class.

There are two types of Services in Android :

1- Bound:

The services which is work for specific activity or application called Bound Service.

2- Unbound:

The Service which is continously running or system provides services called Unbound Service.

If we go through Life Cycle of Bound and Unbound Services,the methods are:

Bound:

i) onCreate()
ii) onBind()
iii) onUnbind()
iv) onDestroy()

Unbound:

i) onCreate()
ii) onStartCommand()
iii) onDestroy()

To know this concept in Brief , see below link
http://developer.android.com/guide/components/services.html

Thursday 20 November 2014

What are the Disadvantage of using Thread ?

1)- Background thread can't access UI elements because UI elements are created by Main Thread

and it is responsible for managing them.

2)- If the process which creates multiple threads gets killed then All the threads gets killed

immediately because threads can't run without process.


What do you mean by Async Task in Android ?

* It is a Task which provides functionality of Background and Main Thread.

* It allows application to be performed in Background thread and Update UI element in
foreground or Main thread.

* Though Async Task can perform both background and foreground operation , multiple
application needs physical copy of Async Task class in their projects.

* So Async Task can be used in Client - Server Application.

When an Async task is executed, the task goes through 4 steps:

  1. onPreExecute()
  2. doInBackground()
  3. onProgressUpdate()
  4. onPostExecute()

In Brief , you can go through this link http://developer.android.com/reference/android/os/AsyncTask.html

Wednesday 19 November 2014

How to create Content Provider and its Steps in Android ?

Content Provider is a component which

1)- hides database details ( database name , table name , coloumn info. etc.).
2)- allows application to share data among multiple application.

Steps to create Content Provider :

i)- Create C.P subclass (android.ContentProvider).
ii)- Register C.P in AndroidManifest.xml using Provider element(<Provider>).

To register Content Provider use following attributes :

1- android:name -> C.P subclass name.
2- android:authorities -> authority used for C.P
3- android:exported - >true/false.

true:-> C.P can be used in other applications.
false:-> C.P can be used in local applications ( the application which is defining C.P).

by default it is true.

URI:

i)- Stands for Universal Resource Identifier.
ii)- It is used to identify C.P uniquely in currentr device.
iii)- URI has a special format. i.e.

Content : // Authority / Path / Record Id




Monday 17 November 2014

What is Convert View and How we use it in Adapter Memory Management ?

To use Memory in Smart way we can use Convert View in Android.

- To reuse the memory for other Iterations.

- A parent View can't have once child view more than once.

Adapter Memory Management:

1)- Adapter by default creates new Object of View for every element in Array.

   - Since the Application runs on Mobile it may crash because of low memory situation.

2)- To avoid creating new object every time getView() method accepts "Convert View" as return 
    
     value of previous iteration.


3)- It is null in first iteration and from next it is the return value of previous iteration.

There are three cases to use Convert View i.e.

1- Convert View Using Single View.

2- Convert View Using a Linear Layout.

3- Convert View Using Layout Inflator.

What is Inflator in Android ?

Inflator is a Class or a component which

1- Parses XML file.

2- Creates object for elements in XML.
  - It Creates heirarchy of Objects.
  - It returns object of root element.

3- Inflator inflate XML for Layout and Menu using LayoutInflator and MenuInflator.

4- To get Layout and MenuInflator activity provides getLayoutInflator() and getMenuInflator()
     method respectivily.


Saturday 15 November 2014

What is ListView in Android ?

- ListView is a Collection or a list of Views.

- ListView requires a class which converts the Array Objects into the ListView understandable format
(View) which is called as Adapter.

- ArrayAdapter is a SubClass of  BaseAdapter which is used for converting an Array into ListView
understandable form(View).

To Create ArrayAdapter following parameters are required :

-Context :  this

-textViewResourceID : the XML file from where the ArrayAdapter should find the TextView(which is used to create an Object).

-Collection : Array/Collection of the Objects which need to be shown in the ListView.

Steps to Create ListView :

- Add ListView element in the XML file or Create an Object of  ListView class .

-Create an Object of ArrayAdapter.

-Set the Adapter to the ListView.



Friday 14 November 2014

Activity Life Cycle in Android.

There are 7 stages in Activity Life Cycle. Activity Manager  manages these activities.
It shows your activity are on which state.

7 methods are :

1- onCreate()
2- onStart()
3- onResume()
4- onPause()
5- onStop()
6- onDestroy()
7- onRestart()

Your Activity can be destroy from onStop() or onRestart().

Created: In this method activity should create its UI.

Started: In this state activity is about to start,it is completely invisible.

Resumed: In this state Activity's UI is completely visible on screen.

Paused: Activity is about to unload or cover because of another activity,in this state activity is completely visible on scree.

Stopped: Activity is unloaded or another activity has fully covered the first activity,in this state activity is
completely visible.

Destroyed: In this state activity is already unloaded and about to get destroyed.

Restarted: In this state activity is about to restart because of uncovering.

Thursday 13 November 2014

What are the components of Android ?

There are mainly 4 components i.e Activity , Service , Content Provider and Broadcast Reciever .
We can also say that they are Pillers of Android.

Some other fundamental components are View , Intent , Fragment , AndroidManifest.xml .

We have to understand all these basic concepts to build an Android Application.

1- An Activity is a User Interface(UI) concept that usually represents a single screen in your application.

2- Service is a component which doesn't have any UI , it runs in background , it can update UI elements ,
     it allows to share functionality among application without creating physical copy of class . Services are
     of two types Bound and Unbound.

3- Content Provider is a component which hides Database details(database name , table name  , coloumn
     info etc.) , it allows application to share data among multiple application . 

4- Broadcast Reciever is a component which is used to recieve broadcasted messeges sent by system
     or other applications.



Wednesday 12 November 2014

How to setup your development environment ?

To build Android applications, you need to establish a development environment.

Few steps are-

1- The Android SDK requires JDK 5 or higher ,So download the JDK and install it.
     For Windows, download JDK 6 from the oracle website.

2- After the JDK is installed, you can download the Eclipse IDE . All versions of Eclipse are available
    on  www.eclipse.org/downloads/  .

3- To build applications for Android, you need the Android SDK. The SDK comes with the base tools
     then you download the package parts that you need and you want to use, it includes emulator so
     you don't need a mobile device with the android OS to develop applications.
     You can Download the Android SDK from http://developer.android.com/sdk 

4- Now you need to install ADT ,an eclipse plugin ,it integrates with eclipse to provide facilities for
     you to create , test and debug applications.


Tuesday 11 November 2014

Architecture Of android or Android Software stack

 In Android the software stack or its architecture is combination of  Linux Kernel , Native Libraries ,

Android runtime i.e. Dalvik VM , Application Frameworks and Applications.

If you want to see in detail please go to the below link.
 
Click to see the Architecture of Android in Brief

1- Linux kernel is responsible for Memory management , File management , Scheduling , Security and other
OS duties.

2- Native Libraries are written in C/C++  includes Media , SQLite , OpenGL , Graphics etc.

3- About Dalvik VM you can see my previous post.

4- Application frameworks provides all manager for development like Activity Manager , Location Manager and Notifiction Manager.

5- And at last Applications like Camera , Gallery , Calculator etc.

Monday 10 November 2014

Delving into the Dalvik VM

Google has spent a lot of time thinking about optimizing designs for low powered handheld devices.
If you look at the list of packages in android , you will see that they are fully featured and extensive.

The key figure in Google implementation of the JVM is Dan Bornstein , who wrote the Dalvik VM.
Dalvik is the name of a town in Iceland.

Dalvik VM takes the generated java class files and combines them into one or more Dalvik Executable
(.dex) files.

The goal of the Dalvik VM is to find every possible way to optimize the JVM for space,performance,
and battery life.

Friday 7 November 2014

History of Android

In 2005 Google acquired the startup company Android Inc. to start the development of Android
platform.

The key players at Android Inc. included  Andy Rubin , Rich Miner , Nick Sears and Chris White.

The Android SDK was first issued as an "early look" release in November 2007.

In September 2008 T-Mobile announced the availablity of T-Mobile G1 , the first smartphone
based on the Android Platform.


Why Android ?


The Android Platform embraces the idea of general purpose computing for handheld devices.

It is a comprehensive platform that features a Linux based operating system stack for managing
devices,memory and processes.

Android Java libraries covers telephony,video,speech,graphics,connectivity,UI programming and a no.
of other aspects of the device.

It is built for mobile and tablet based devices. Google makes the framework available to java developers
through a Software Development Kit (SDK) called the Android SDK.

When you are working with the Android SDK you rarely feel that you are writing to a mobile device
because you access most of the class libraries that you use on a desktop or a server.