2. CONFIDENTIAL INFORMATION
This document is confidential and proprietary information
of Target Soft Systems. Confidential Information includes,
but is not limited to, the following:
Corporate, Employee and Infrastructure Information about
Target Soft Systems.
Target Soft Systems implementation , Training
methodology, cost, project management and quality
processes.
Any disclosure of Confidential Information to, or use of it
by a third party (i.e., a party other than authorised , will be
damaging to Target Soft Systems). Ownership of all
Confidential Information, no matter in what media it
resides, remains with Target Soft Systems( TSS ).
Confidential Information in this document shall not be
disclosed outside the buyer’s proposal evaluators and shall
not be duplicated, used, or disclosed – in whole or in part –
for any purpose other than to evaluate this proposal
without specific written permission of an authorized
representative of Target Soft Systems.
3.
4.
5.
6.
7.
8.
9. REFRESHMENT OF OOPS
» What is OOPS ?
» Object
» Class
» Abstraction
» Encapsulation
» Inheritance
» Polymorphism(Run Time & Compile Time)
10. Object Oriented Programming System
Object Oriented Programming is a methodology to design a
program using Classes and Objects.
It simplifies the software development and maintenance by
providing some concepts:
> Object
> Class
> Inheritance
> Polymorphism
> Abstraction
> Encapsulation
11. OBJECT
A runtime entity that has state and behavior is known as Object.
Object= data + method ,Object is an instance of a class.
An object has these characteristics:
State: represents the data of an Object.
Behavior: represents the behavior of an Object.
Real time Example:
Pen is an object. Its name is Reynolds, color is White etc,.Known as
it state.
It is used to write, so Writing is its behavior.
12. CLASS
A Class is a group of objects that have common property.
(or)
Collection of Objects.
It is a Template or Blue Print from which objects are created.
Syntax to declare a Class:
Class <class name>
{
data member;
method;
}
13. Example for Class and Object:
Class Company
{
String name = “Target Soft Systems”;
int phoneno = “9382383393”;
public static void main( string[] args)
{
Student s1 = new Company(); // object
System.out.println(“Name is:” +s1.name);
System.out.println(“Phone No:” +s1.phoneno);
}
}
Output:
Name is: Target Soft Systems
Phone No: 9382383393
14. ABSTRACTION
Abstraction is a process of hiding the implementation details and
showing only functionality to the user.
(OR)
It highlights the essential things to the user and hides the non- essential
things.
Real Time Example:
Sending SMS: you just type the text and send the message
you don’t know the internal processing about message delivery.
Syntax to declare the abstract class:
Abstract class < class- name>
{
}
15. ENCAPSULATION
Encapsulation is a process of wrapping code and Data together into
a single unit.
We can calculate a fully encapsulated class by making all the data
members of the class private now we can use setter and getter
methods to set and get the data in it.
16. INHERITANCE
Inheritance is a mechanism in which one object acquires and the
properties and behaviors of parent class. A new class derived from
old class.
Syntax for Inheritance:
class subclass name extends super class name
{
}
extends is a key word is used to inherit one class for another class.
On the basis of class, there can be three types of inheritance single,
multilevel and Hierarchical. Multiple and Hybrid is supported
through interface only.
To reduce the complexity and simplify the language, multiple
interfaces are not supported in Java.
17. POLYMORPHISM
In general polymorphism is a particular thing behave differently in
a different situation
Two types of Polymorphism:
Compile time Polymorphism
Run time Polymorphism
Compile time Polymorphism Example: Method Overriding.
Run time Polymorphism Example: Method Overloading.
Real time Example:
Mobile Phone: It acts like a phone where you calling to someone.
It acts like a camera whiles you taking a snap.
It acts like a Music player whiles you hearing song from that.
18. Compile Time Polymorphism
Method Overriding:
Method having same name, same number of arguments and its data
type.
Sum( int a, int b)
Sum( int c, int d)
Sum( float a, float b)
Sum( float c, float d)
overriding method MUST have the same argument list (if not, it
might be a case of overloading)
19. Run time Polymorphism
Method overloading:
Method having same name but difference in the number of
arguments and its data type.
Example:
Sum( int a, int b)
Sum( int a, int b, int c)
Sum( float a, float b)
Sum( float a, float b, float c)
For example the entire method names are same but the main
difference in the number of arguments and its data type.
21. DIFFERENCE BETWEEN BASIC MOBILE &
SMART MOBILE
BASIC MOBILE SMART MOBILE
A normal phone has the primary purpose of only
calling and sending text messages
Smart phones offer a variety of features that
allows advanced computing capability and
connectivity.
Its not possible to install the mobile apps in
basic phone
It is possible to install the mobile apps using
smart phone
Basic phones are quite cheap Smart phones are costlier when comparing to
basic phones.
Its not possible to use a memory card It is possible to use a memory card.
22. WHY SMARTPHONE?
• Smart phone plays a major role among the users.
• The current generation of consumers are equipped
with smart phones that provide extensive
applications to transact with.
• Besides making phone calls, nearly all smart
phones today can natively provide directions
through GPS, take pictures, play music and keep
track of appointments and contacts.
• Through the installation of apps, the list of
possible smart phone uses multiplies by tens of
thousands and grows longer everyday.
26. ABOUT ANDROID
If you are interested in mobile app
development, you need to learn android.
Learning android app development and
programming is important for professional
programmers and amateurs alike, simply
because there is a lot you can achieve
through an android app of your own.
According to a report by Google in
September 2012, 500 million android
activations have already taken place all
over the world. The comScore mobiLens
survey reported in January 2013 that there
were 68 million Android users in US
alone.
27. ANDROID HISTORY
•Android Inc was founded in Palo Alto of California, U.S. by Andy
Rubin, Rich miner, Nick sears and Chris White in 2003. Later
Android Inc. was acquired by Google in 2005.
•In 2005 Google purchased Android and took over its development
work and also the development team.
•Google wanted Android to be open and free then most of the
Android code was released under open source.
28. VERSIONS OF ANDROID
Pre-commercial release versions (2007–2008)
Android alpha
There were at least two internal releases inside Google and the OHA
releases code-named “Astra Boy", “Bender"
Android beta
The Android beta was released on 5 November 2007
The Software Development Kit (SDK) was released on 12th November
2007.
The 5th November date is popularly celebrated as “Android's Birthday”
29. SDK
• A software development kit that enables
developers to create applications for the
Android platform. The Android SDK includes
sample projects with source code, development
tools, an emulator, and required libraries to
build Android applications. Applications are
written using the Java programming language
and run on Dalvik, a custom virtual machine
designed for embedded use which runs on top
of a Linux kernel.
30. VERSIONS OF ANDROID
Android has seen numerous Updates which have incrementally
improved the operating system, adding new features and fixing bugs
in previous releases.
Each major release is named in alphabetical order after a dessert or
sugary treat
For example
Version 1.5 Cupcake was followed by 1.6 Donut.
The latest released version is 4.4 Kit Kat
31. CUPCAKE 1.5
On 30 April 2009, the Android 1.5 update was released.
This was the first release to officially use a codename based on a
dessert item
("Cupcake")
» Added auto-rotation option.
» Copy and Paste feature added in the web browser.
» Increased speed and performance but not up to required level.
VERSIONS OF ANDROID
32. DONUT 1.6
On 15 September 2009, the Android 1.6 SDK - Donut was
released
» Voice search
» Search box
» Faster OS boot times
» Fast web browsing experience.
» Typing is quite slower.
VERSIONS OF ANDROID
33. ECLAIR 2.0
On 26 October 2009, the Android 2.0 SDK codenamed Eclair
was released.
» Bluetooth 2.1 support.
» Improved typing speed on virtual
keyboard with smarter dictionary.
» no Adobe flash media support.
on 3 December 2009 Android 2.0.1 Éclair was released.
on 12 January 2010 Android 2.1 Éclair was released.
VERSIONS OF ANDROID
34. FROYO 2.2
On 20 May 2010, the SDK for Android 2.2 was released
» Support for Adobe Flash 10.1
» Improved Application launcher
with better browser
» No internet calling.
VERSIONS OF ANDROID
35. GINGERBREAD 2.3
On 6 December 2010, the Android 2.3 (Gingerbread) SDK was
released
» Updated User Interface with high
» efficiency and speed
» Internet calling
» One touch word selection and copy/paste.
» New keyboard for faster word input.
on 9 February 2011 Android 2.3.3 Gingerbread was released.
on 28 April 2011 Android 2.3.4 Gingerbread was released.
VERSIONS OF ANDROID
36. HONEYCOMB 3.0
On 22 February 2011, the Android 3.0 (Honeycomb) SDK was
released
» Support for multi-core processors
» Ability to encrypt all user data.
» This version of android is only available for tablets.
on 10 May 2011 Android 3.1 Honeycomb was released.
on 15 July 2011 Android 3.2 Honeycomb was released.
VERSIONS OF ANDROID
37. ICE CREAM SANDWICH 4.0
On 19 October 2011, the Android 4.0 (Ice Cream Sandwich) SDK
was released
» Virtual button in the UI.
» A new typeface family for the UI.
» Ability to shut down apps that are using data in the background
on 16 December 2011 4.0.3 Ice Cream Sandwich was released.
on 29 March 2012 4.0.4 Ice Cream Sandwich was released.
VERSIONS OF ANDROID
38. JELLY BEAN 4.1
On 27 June 2012, the Android 4.1 (Jelly Bean) SDK was released
» User – Installable Keyboard Maps
» Audio record triggering
» Bluetooth Data Transfer with Android Beam.
on 29 October 2012 4.2 Jelly Bean was released.
on 24 July 2013 4.3 Jelly Bean was released.
VERSIONS OF ANDROID
39. KIT KAT 4.4
On 3 September 2013, the Android 4.4 (Kit Kat) SDK was
released
» Built-In Screen Recording.
» Wireless printing Capability
VERSIONS OF ANDROID
40. LOLLIPOPANDROID 5.0
• on June 25, 2014, the
android LolliPop 5.0 was
released.
• Redesigned user interface
built around a design
language known as
"Material design".
• Improvements to the
notifications, which can be
accessed from the lock
screen and displayed within
applications as top-of-the-
screen banners.
41. ANDROID FEATURES
» STRORAGE
SQLite, a lightweight relational database.
» CONNECTIVITY
Supports GSM, CDMA, Bluetooth, Wi-Fi, WiMAX.
» MESSAGING
Supports both SMS and MMS.
» MEDIA SUPPORT
Supports following media files:
MP3,3GP,MP4,JPEG,PNG,GIF,BMP,AMR,MIDI,...etc.
» HARDWARE SUPPORT
Accelerometer sensor, Camera, GPS
43. Environment Setup
Set up
Your Development
Environment
Set up AVD’s and
Devices for
Testing
Install the Android
SDK , Android
Developer Tools and
Android Platform
Create Android Virtual
Device and connect
Hardware Device that
will be used for Testing
45. Debugging & Testing
Build and Run
Your Application
Debug your
Application
Build and Run your Application
In Debug Mode
Debug your Applications using the
Android Debugging and Logging
Tools
Test Your Application using the
Android Testing and Instrumentation
Framework
Test your
Application
47. Android Architecture
Android Architecture having Four Main Layer and One Sub
Layer
» Applications - Main Layer
» Application Framework - Main Layer
» Libraries - Main Layer
» Android Runtime - Sub Layer
» Linux kernel - Main Layer
49. Linux Kernel
» Relying on Linux Kernel 2.6 for core system services
» Memory and Process Management
» Network Stack
» Driver Model
» Security
» Providing an abstraction layer between the H/W and the rest
of the S/W stack
50. Android Runtime
Core Libraries
Providing most of the functionality available in the core
libraries of the Java language
Dalvik Virtual Machine
Providing environment on which every Android application
runs
51. Libraries
» Including a set of C/C++ libraries used by components of the
Android system
» Exposed to developers through the Android application
framework
52. Application Framework Layer
Feature Role
View
System
Used to build an application, including lists, grids, text
boxes, buttons, and embedded web browser
Content
Provider
Enabling applications to access data from other
applications or to share their own data
Resource
Manager
Providing access to non-code resources (localized strings,
graphics, and layout files)
Notification
Manager
Enabling all applications to display customer alerts in the
status bar
Activity
Manager
Managing the lifecycle of applications and providing
a common navigation back stack
55. ADT- Android Developer Tools
Eclipse IDE
Android SDK
ADT Plug-in
Java JDK 1.7
OS Requirements
Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or
64-bit)
Mac OS X 10.5.8 or later (x86 only)
Linux (tested on Ubuntu Linux, Lucid Lynx)
On Ubuntu Linux, version 8.04 or later is required.
64-bit distributions must be capable of running 32-bit applications.
How to set up Android
Environment
57. Activities
Visual user interface focused on a single thing a user
can do
Services
`No visual interface – they run in the background
Broadcast Receivers
Receive and react to broadcast announcements
Content Providers
Allow data exchange between applications
58. » Basic component of most applications
» Most applications have several activities that start each other as
needed
» Each is implemented as a subclass of the base Activity class
» Each activity has a default window to draw in.
» The content of the window is a view or a group of views.
» View(Group) made visible via Activity.setContentView()
method.
Activities
59. Services
» Does not have a visual interface
» Runs in the background indefinitely
» Examples
» Network Downloads
» Playing Music
» You can bind to a an existing service and control its
operation
60. Broadcast Receiver
» Receive and react to broadcast announcements
» Extend the class Broadcast Receiver
» Examples of broadcasts:
» Low battery, power connected, shutdown, time zone
changed, etc.
» Other applications can initiate broadcasts
61. Content Providers
» Makes some of the application data available to other applications
» It’s the only way to transfer data between applications in Android
(no shared files, shared memory, pipes, etc.)
» Extends the class Content Provider;
» Other applications use a Content Resolver object to access the data
provided via a Content Provider
62. Activity Life Cycle
Each application runs in its own process.
Each activity of an app is run in the apps process
Processes are started and stopped as needed to run an apps
components.
Processes may be killed to reclaim needed resources.
Killed apps may be restored to their last state when
requested by the user
63. Most management of the life cycle is done automatically
by the system via the activity stack.
The activity class has the following method callbacks to
help you manage the app:
–onCreate()
–onStart()
–onResume()
–onPause()
–onStop()
–onRestart()
–onDestroy()
64. • Activities have
several states
• Lifecycle methods are
called on transitions
• You typically don’t
need to use them all,
but they are there
65. DDMS
Dalvik Debug Monitor Service, a GUI debugging application
shipped with the SDK. It provides screen capture, log dump, and
process examination capabilities.
Viewing heap usage for a process
DDMS allows you to view how much heap memory a
process is using. This information is useful in tracking heap
usage at a certain point of time during the execution of your
application.
Tracking memory allocation of objects
DDMS provides a feature to track objects that are being
allocated to memory and to see which classes and threads are
allocating the objects.
66. LOGCAT
Logcat is integrated into DDMS, and outputs the messages that you
print out using the Log class along with other system messages
such as stack traces when the exceptions are thrown.
Emulating phone operations and location
The emulator control tab lets you simulate a phone’s voice
and data network status. This is useful when you want to test your
application’s robustness in differing network environments.
Changing network state, speed, and latency
The Telephony Status section of the Emulator controls tab
lets you change different aspects of the phone’s networks status,
speed and latency.
67. Voice - unregistered, home, roaming, searching, denied
Data - unregistered, home, roaming, searching, denied
Speed - Full, GSM, HSCSD, GPRS, EDGE, UMTS, HSDPA
Latency - GPRS, EDGE, UMTS
Spooling calls or SMS text messages
The Telephony Actions section of the emulator controls tab
lets you spoof calls and messages.
• Voice - Enter a number in the incoming number field and click
call to send a simulated call to the emulator or phone Click the
Hang up button to terminate the call.
• SMS - Enter a number in the incoming number field and a
message in the Message: field and click the Send button to send
the message
68. Views
An Activity contains Views and View Groups.
A View is a widget that has an appearance on screen.
A view derives from the base class android.view.View
Examples of views are buttons, labels and text boxes.
Textview Syntax:
TextView tv;
tv = (TextView) findViewById(R.id.textview);
tv.setText(“ Textview is displayed ”);
69. User Interface
variety of widgets that are useful when creating forms,
1. image buttons,
2. text fields,
3. checkboxes,
4. radio buttons,
5. Toggle buttons,
6. Rating bar
70. View Groups
A ViewGroup provided a layout in which the order and
appearance of the views are placed.
A view derives from the base class android.view.ViewGroup.
Android supports the following ViewGroups,
LinearLayout RelativeLayout
AbsoluteLayout TableLayout
FrameLayout ScrollView
76. • Notification is just to
notify some incoming
mails and login status of
friends etc…
• Have to import these
packages import
android.app.Notification;
Import
android.app.NotificationM
anager;
• A Notification is a short
message breifly
displayed on the status
line.
77.
78. Three of the core components of an Android application -
activities, services, and broadcast receivers - are activated
through messages, called intents
One activity starts another activity by creating/sending an
Intent
Means of leveraging activities, services, and broadcast
receivers of other applications .
Intents
In earlier days communications are done with the help of sending letters, couriers,telegram.
Another way for communication in earlier days , if both receivers having a landline phone in their home the information's are exchange.
Without mobile most of the work is not possible in today's world