6 Chapters
6 Chapters
6 Chapters
Android is an open source operating System for mobile devices such as smart-phones
and tablet,computers. Android offers a unified approach to
application development for mobile devices which means developers need to develop only for
Android, and their applications should be able to run on different devices powered by android.
Android was developed by the Open Handset Alliance(OHA) , led by Google, and other
companies.Android is mainly based on direct manipulation ,using touch gestures that looses
correspond to real world actions. It provide us with the manipulate
on-screen object,along with a virtual keyboard for text input.
Android was initially developed by Android Inc., the code names of android ranges from A to N.
Founded by Andy Rubin in Palo Alto,California, United States in Oct 2003. Android word is
actually reffered to as robot
Android was named after the nickname of Andy Rubin by their co-workers for his love for robot.
2. Android 1.5(Cupcake)
3. Android 1.6(Donut)
4. Android 2.0(Eclair)
5. Android 2.0.1(Eclair_0_1)
6. Android 2.1.x(Eclair_MR1)
7. Android 2.2.x(Froyo)
We will start our Android application development on any of the following operating systems:
Microsoft Window XP or later version.
Mac OS X 10.5.8 or later version with Intel chip Linux
including GNU Library with Intel chip.
ANDROID
2.7 Overview
Android applications are freely available and can be downloaded from the Web. Following is the list of
software's you will need before you start your Android application programming.
This all software required in the installation of Android application.This setup is required for the
configuration with RAM less or more than 4gb:
Java JDK5 or JDK6
Download the latest version of Java JDK and install the JDK and set the environmental
path for it.
Android SDK
Download Android SDK from Android’s official website :
http://developer.android.com/sdk/index.html
If you install SDK either on Mac OS or Linux, follow the instruction and setup the environment
path.
Launch Android SDK Manager using option All Program>Android SDK Tools>SDK Manager
Let's start with launching Eclipse and then, choose Help > Software Updates > Install New
Software
2.8 Android Virtual Device
To test our android application we will need a virtual Android device. Before start writing our code
we create an Android Virtual Device Android operating system is a stack of software components
which is roughly divided into five sections and four main layers :
Application
You will find all the Android application at the top layer. You will write your application to
be installed on this layer only
Application Framework
The Application Framework layer provides many higher-level services to applications in the form
of Java classes.
Libraries
There is a set of libraries including open-source Web browser engine WebKit, well known library
libc, SQLite database,etc.
Linux Kernel
At the bottom of the layers is Linux,This provides basic system functionality like process
management, memory management, device management like camera, keypad, display etc.
Android-
-Manifest.xml
Following four main component that can be used within an Android application :
1) Activities :- They dictate the UI and handle the user interaction to the smartphone screen
public class MainActivity extends Activity
{ }
The first step is to create a simple Android Application using Android Studio.Follow the option File ->
New -> New Project ->Enter application name in the pop-up window.Then select a Empty
activity->next->Activity name->Finish.
Before going to project that I made we need to know some basic concept of Android for better
understanding.
Since every project that we do in android studio must contain this files:-
.java file
.xml file
AndroidMenifest file
4.1 .javaFile :
This file include all the codes and logic written in it.
We canopen it in the android project -> app -> java ->
com.example.username.filename -> MainActivity.java
When we run our program methods that are called :
- onCreate(Bundle) :- It is used to initialize our activity.
Interface.
-findViewById(int) :- It is used to retrieve widgets in the that UI that
we need to interact.
-onPause() :- Where we deal with the user leaving activity.
4.2.xmlFile :
It is used to define the actual User Interface of our application.
We can open the .xml from app -> res ->layout -> ActivityName.xml
We can find all the elements or the tools that we want to use in our project.
It has two different layout i.e; a coding layout where we can code for our required elements needed
like buttons, text views,etc.
Or, we can directly drag and drop the required elements in the given design layout.
The Android framework gives us the flexibility to use either or both of these
methods for declaring and managing our apps UI.
4.6 Camera :
We can directly integrate the camera into your application via the Camera API. Using the camera on the
Android device can be done via integration of the existing Camera application. In this case you would
start the existing Camera application via an Intent and to get the data after the user returns to our
application.
4.7 Permission given:
In the manifest file we give the following permission to the application to access the hardware
component i.e; camera :
<uses-feature android:name="android.hardware.Camera"/
>
After giving permission to the app we also have to give the special permission to the app through our
device to the location ,
Setting -> apps -> open app -> permission -> camera allow -> close setting
4.8 EXAMPLE
Intents :- Intents are objects of the android.content.Intent type.It can be started using
startActivity( ) method. It is used to move one activity to another .It contain the data via a
Bundle.
Toast :- A Toast can be used to display information for the short period of time. A Toast
contains message to be displayed quickly and disappear after sometime.The
android.widget.Toast class is the subclass of java.lang.Object class.
CONCLUSION
After completing this project, I concluded that this project was the
good opportunity to implement my information that I have learnt during
my internship program.This project is more informative and more helpful
for understanding the concept of the android app development.This
project is only a small and easy one but it is enough to implement my
concept. I can further try much harder to make much more efficient and
useful app that can benefit to other.
Bibliography
Following are the links from which all the information have been taken :
1. https://developer.android.com/training/basics/index.html
2. https://developer.android.com/training/basics/concept/
creating- project.html
3. http://www.hiddenbrains.com/android-application-development.html
4. http://www.letsnurture.com/services/mobile/android-
mobile- application-devel opment.html
https://www.tutorialspoint.com/android/
REFERENCES