Saturday 28 September 2013

Android Development Tools

1 Android SDK

The Android Software Development Kit (Android SDK) contains the necessary tools to create, compile and package Android applications. Most of these tools are command line based. The primary way to develop Android applications is based on the Java programming language.
The Android SDK contains the Android debug bridge (adb) which is a tool which allows you to connect to a virtual or real Android device for the purpose of managing the device or debugging your application.

2. Android Developer Tools and Android Studio


Google provides graphical development environments based on the Eclipse and IntelliJ IDE to develop new applications.
The Android Developer Tools (ADT) are based on the Eclipse IDE and provide additional functionalities to develop Android applications. ADT is a set of components (plug-ins) which extend the Eclipse IDE with Android development capabilities.
Google also supports an IDE called the Android Studio for creating Android applications. This IDE is based on the IntelliJ IDE.
Both tools contain all required functionalities to create, compile, debug and deploy Android applications from the IDE. They also allow the developer to create and start Android virtual devices for testing.
Both tools provide specialized editors for Android specific files. Most of Android configuration files are based on XML. In this case these editors allow you to switch between the XML representation of the file and a structured user interface for entering the data.

3. Dalvik Virtual Machine

The Android system uses a special virtual machine, i.e. the Dalvik Virtual Machine to run Java based applications. Dalvik uses a custom bytecode format which is different from Java bytecode.
Therefore you cannot run Java class files on Android directly; they need to get converted in the Dalvik bytecode format.

Google Play Android

Google Play

Google offers the Google Play service in which programmers can offer their Android applications to Android users. End users use the Google Play application which allows to buy and install applications from the Google Play service.


Google Play also offers an update service. If a programmer uploads a new version of his application to Google Play, this service notifies existing users that an update is available and allows them to install the update.


Google Play provides also access to services and libraries for Android application programmers. For example it provides a service to use and display Google Maps and another to synchronize application state between different Android installations. Providing these services via Google Play has the advantage that they are available for older Android releases and can be updated by Google without the need for an update of the Android release on the phone.

Friday 27 September 2013

Methods that handle Android Activity

In general the movement through an activity's lifecycle looks like this:
MethodDescriptionKillable?Next
onCreate()Called when the activity is first created. This is where you should do all of your normal static set up: create views, bind data to lists, etc. This method also provides you with a Bundle containing the activity's previously frozen state, if there was one. Always followed by onStart().NoonStart()
    onRestart()Called after your activity has been stopped, prior to it being started again. Always followed by onStart()NoonStart()
onStart()Called when the activity is becoming visible to the user. Followed by onResume() if the activity comes to the foreground, or onStop() if it becomes hidden.NoonResume() or onStop()
    onResume()Called when the activity will start interacting with the user. At this point your activity is at the top of the activity stack, with user input going to it. Always followed by onPause().NoonPause()
onPause()Called when the system is about to start resuming a previous activity. This is typically used to commit unsaved changes to persistent data, stop animations and other things that may be consuming CPU, etc. Implementations of this method must be very quick because the next activity will not be resumed until this method returns. Followed by either onResume() if the activity returns back to the front, or onStop() if it becomes invisible to the user.Pre-HONEYCOMBonResume() or
onStop()
onStop()Called when the activity is no longer visible to the user, because another activity has been resumed and is covering this one. This may happen either because a new activity is being started, an existing one is being brought in front of this one, or this one is being destroyed. Followed by either onRestart() if this activity is coming back to interact with the user, or onDestroy() if this activity is going away.YesonRestart() or
onDestroy()
onDestroy()The final call you receive before your activity is destroyed. This can happen either because the activity is finishing (someone called finish() on it, or because the system is temporarily destroying this instance of the activity to save space. You can distinguish between these two scenarios with the isFinishing() method.Yesnothing
Note the "Killable" column in the above table -- for those methods that are marked as being killable, after that method

Android-Activity-Life-Cycle

Activity Lifecycle

Activities in the system are managed as an activity stack. When a new activity is started, it is placed on the top of the stack and becomes the running activity -- the previous activity always remains below it in the stack, and will not come to the foreground again until the new activity exits.

An activity has essentially four states:

·         If an activity in the foreground of the screen (at the top of the stack), it is active or running.
·         If an activity has lost focus but is still visible (that is, a new non-full-sized or transparent activity has focus on top of your activity), it is paused. A paused activity is completely alive (it maintains all state and member information and remains attached to the window manager), but can be killed by the system in extreme low memory situations.
·         If an activity is completely obscured by another activity, it is stopped. It still retains all state and member information, however, it is no longer visible to the user so its window is hidden and it will often be killed by the system when memory is needed elsewhere.
·         If an activity is paused or stopped, the system can drop the activity from memory by either asking it to finish, or simply killing its process. When it is displayed again to the user, it must be completely restarted and restored to its previous state

Tuesday 24 September 2013

Component Of Android Project

Project Component

Activity:  Activity Detail  

 An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View).

Broadcast Receiver:

 A broadcast receiver (short receiver) is an Android component which allows you to register for system or application events. All registered receivers for an event will be notified by the Android run time once this event happens.
For example applications can register for the ACTION_BOOT_COMPLETED system event which is fired once the Android system has completed the boot process.

Services:

A service is a component which runs in the background, without direct interaction with the user. As the service has no user interface it is not bound to the life cycle of an activity.
Services are used for repetitive and potential long running operations, like Internet downloads, checking for new data, data processing, updating content providers and the like.
Services run with a higher priority than inactive or invisible activities and therefore it is less likely that the Android system terminates them. Services can also be configured to be restarted, if they get terminated by the Android system once sufficient system resources are available again.
It is possible to assign services the same priority as foreground activities. In this case it is required to have a visible notification active for the related service. It is frequently used for services which play videos or music.

Content Provider:

A content provider component supplies data from one application to others on request. Such requests are handled by the methods of the ContentResolver class. A content provider can use different ways to store its data and the data can be stored in a database, in files, or even over a network.
Each Android applications runs in its own process with its own permissions which keeps an application data hidden from another application. But sometimes it is required to share data across applications. This is where content providers become very useful.
Content providers let you centralize content in one place and have many different applications access it as needed. A content provider behaves very much like a database where you can query it, edit its content, as well as add or delete content usingg insert(), update(), delete(), and query() methods. In most cases this data is stored in an SQlite database.


Sunday 22 September 2013

Where is Android going?



The Android OS may accelerate the diffusion of smart

phones by providing a free OS.

Access to the Android software development kit (SDK) suggests that the number of applications will continue to swell as professional developers provide new offerings.

Transforming them from consumers of existing applications to creators of apps designed to meet their needs.

Android, by increasing the user base, might hasten the integration of mobile technology.

Android is the Biggest selling OS in the World on Mobile Computing.

What are the downsides of Android?



Platform fragmentation is an issue for Android OS devices.

- New application releases may not work reliably

across all Android devices.

For developers, the variety of device types and form factors that use

Android make development more expensive.

- Google does not oversee or approve third-party Android apps

before they go to market.

- Half of Application sent private information including GPS coordinates and phone numbers to remote servers without seeking permission or notifying users.

How does Android work?

Its open market model allows registered software developers
    to create applications for Android
-   Listing of Applications in Android Market
Users can download from a growing store of
    smart-phone applications at Google Market
Download compatible Android apps from other locations

Where is Android going?

The Android OS may accelerate the diffusion of smart
    phones by providing a free OS.
Access to the Android software development kit (SDK) suggests that the number of applications will continue to swell as professional developers provide new offerings.
Transforming them from consumers of existing applications to creators of apps designed to meet their needs.
Android, by increasing the user base, might hasten the integration of mobile technology.
Android is the Biggest selling OS in the World on Mobile Computing.

Significance Of Android

  • Android has been selected by many hardware manufacturers to run on a wide range of devices.
  • Android based phones are available from all major cellular providers.
  • Android may bring smart phone and tablet functionality to a much wider cross-section of students.
  • Android is a User Friendly OS.


What Make Android Special


Truly open, free development platform

Linux based

Component-based architecture

Reusable, replaceable modules 

Multi-layer isolation of programs

Many services included

High quality graphics and sound

Portability across hardware

Java programs executed by Davlik virtual machine

ARM, x86 and other 

Support by multiple large organizations

Saturday 21 September 2013

History-OF-Android


History of Android

             July 2005
                 Google acquired Android Inc.
        5 Nov 2007
                Open HandSet Alliance formed-
                                   Google, HTC, Intel, Motorola, Qualcomm
          T-Mobile android is the OHA first product
            12 Nov 2007
                              OHA released a preview of the Android OHA

              Why Android Created

              • Software development
              • Run on very small electronic devices
              •  Full phone software stack including applications
              •  Android is open
              •  Android is free
              • Developer can make and customize there own mobile applications

              What is Android

              Android is a free, open source mobile platform
              • A Linux-based, multi-process, multi-threaded Operating System.
              • Android is not a device or a product

              • It’s not even limited to phones - you could build a DVR, a handheld GPS, an MP3 player, etc. that supports Bluetooth, Wi-Fi, and 3G and 4G networking

              Today's Pageviews